PDA

Xem đầy đủ chức năng : Help! help! Help me with computer programming



letue
18-10-2009, 08:31 PM
In this assignment you will analyze how two loops work. Analyze the programs without running them and send me the results. Later verify your analysis with Visual Studio. To do the analysis write how the variables change and what will be displayed at the output.
Note: Just by doing this assignment you will get whole credit, so don't cheat yourself by trying to do the program and then send the results. Even if you get a full credit anyway try to do the serious effort or in that case you will get no credit at all.

First Program
int a = 23;

while (a > 12){

printf("a has %i\n”, a);

if (a > 15)

a++;

a -= 2;

}

a Output

-------------------------------------------------------------------------------------

Second Program
int i = 100;

while ( i >= 12){

printf(“I’m inside loop!\n");

i = 500;

}

i Output




I dont know where to start and what to do with this assignment :so_funny:
giúp Tuệ với nha bà con ...Thanks)