" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
-------- FOR ---------
int i;
int jml = 0;
for(i = 1; i <= 8; i++){
jml = jml + i;
}
--------- WHILE ---------
int i = 1;
int jml = 0;
while(i<=8){
jml = jml + i;
i++;
}
--------- DO WHILE ------------
int i = 1;
int jml = 0;
do{
jml = jml + i;
i++;
} while (i<=8);