Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions