Hello C++ forum users! Im here with another question for you, yet again!
Recently I have had a problem with converting for loops to while loops and if functions to switch functions. I was wondering if you could help me with these functions. The first one being the "for to while" conversion and the other one is the "if to switch" conversion.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
for (i = 0; i < N; i += 2) a += i;
(^^^^^^^^ Converting this to while loop)
if (grade == 90)
printf (“Harf Notunuz: AA) ;
elseif (grade == 80)
printf (“Harf Notunuz: BB) ;
elseif (grade == 70)
printf (“Harf Notunuz: CC) ;
elseif (grade == 60)
printf (“Harf Notunuz: DD) ;
else
printf (“Harf Notunuz: FF) ;
(^^^^^^^^^ Converting this to switch)
I have had my tries with these but I am just a newbie to the C language so the best place to come for help were you guys!
Thanks in advance!