0
Anybody can explain me why is output 36
5 Respuestas
+ 2
During first loop
prod=prod*326%10=1*6=6
x=(x-x%10)/10=(326-326%10)/10=(326-6)/10=320/10=32
During second loop
prod=prod*32%10=6*2=12
x=(x-x%10)/10=(32-32%10)/10=(32-2)/10=30/10=3
During third loop
prod=prod*3%10=12*3=36
x=(x-x%10)/10=(3-3%10)/10=(3-3)/10=0/10=0
Loop stops
+ 1
Тимур Завьялов result is 36
0
Abhay, but it written 326
0
Тимур Завьялов yup sorry result would be same still ,I will edit it
0
Abhay, but I have a result is 32, tell me why?