Question: You need to find 5 errors of this code and write line numbers seperating with commas (Ex: 1,2,3) 1 include 2 3 int main ()

You need to find 5 errors of this code and write line numbers seperating with commas (Ex: 1,2,3)

1 include 2 3 int main () 4 { 5 int choice; 6 int pos_count = 0, 7 int neg_count = 0; 8 choice = -7, 9 printf("Choice = %d ",choice); 10 while (choice <= 20) 11 { 12 if (choice > 0) 13 { 14 pos_count++; 15 } 16 else 17 { 18 neg_count++; 19 } 20 choice = choice + 2, 21 } 22 printf("Positive Count = %d Negative Count = %d ", pos_count, neg_count); 23 return 0 24 }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!