307,702 views
5 votes
5 votes
Write a program using for loop to find the cube of numbers from 50-100
FASTT

User Bagbyte
by
2.6k points

1 Answer

18 votes
18 votes

Answer:

JAVA

for(int i = 50; i <= 100 i++;)

{

int cubedNum = Math.pow(i, 4);

System.out.println(cubedNum);

}

Step-by-step explanation:

The For loop is set so that it will go the amount of times until the variable i reaches 100, then it will stop increasing i.

Then, we raise i to the 4th power in the loop, and then print it out.

#teamtrees #PAW (Plant And Water)

User Emiles
by
2.8k points