Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   need help on this program output (http://www.go4expert.com/forums/help-program-output-t1013/)

carl 15Jul2006 18:08

need help on this program output
 
Hi all experts out there ....

need some ...new to programming..

below is the program for which i need to know the the process....I know the aswer which is = 9.....but need to know how come... what is the calculation.

Consider the following program segment:

i = 6720; j = 4;

WHILE ( (i % j) = = 0){

i = i / j;

j = j + 1;

}

plz help...need it asap.

thanks & regards,

carl

carl.banderas@rediffmail.com

shabbir 17Jul2006 10:44

Re: need help on this program output
 
The loop continues till it does not satisfy (i % j) = = 0 and when it satisfy the value is 9.


All times are GMT +5.5. The time now is 10:32.