Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

please how i can slove it ? Rewrite the following fragment using switch: if (ch == 'A') a_grade++; else if (ch == 'B') b_grade++; else if (ch == 'C') c_grade++; else if (ch == 'D') d_grade++; else f_grade++;

OpenStudy (anonymous):

do you know what switch is?

OpenStudy (anonymous):

it's a selection struture in c++

OpenStudy (anonymous):

switch(ch){ case: 'A' //do something useful break; case: 'B' //do some other useful thing break; } above syntax might be a little off depending on your programming language of choice

OpenStudy (anonymous):

thanks

OpenStudy (anonymous):

never forget the default case.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
3 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
3 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!