Plz Could anyone explain the program, it prints sum=1650?????
class forloop{
public static void main(String args[])
{
int sum = 0;
for(int i=1;i<5;i++){
for(int j=10;j<15;j++){
for(int k=0;k<5;k++){
sum+=i+j+k;
System.out.println("sum: "+sum);
}//k
}//j
}//i
}//main
}//forloop class
thanks
regards
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---