Computer Science, asked by ushananthini20, 8 months ago

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 ltzRaj12
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 parampremdhawa
0

Answer:

Program in Java

Thank Uhhhh!!!! ;)

Attachments:
Similar questions