The program to print the sum of all cubes that lie between 0 and 100 is given below. Does the program have an error? If yes, which statement should be modified to correct the program?
Answers
Answered by
3
import java.util.* ;
class hg
{
void main ()
{
double sum ;
for (int i = 0 ; i < = 100 ; i++ )
{
sum = ( i × i × i ) ;
}
System.out.println(i);
}
}
Answered by
0
Answer:
Program in Java
Thank Uhhhh!!!! ;)
Attachments:
Similar questions