Computer Science, asked by 40kumarisanjeewani27, 17 days ago

write a program to print sum of cubes of odd number between 1 to 10​

Answers

Answered by lalitag2014
0

Answer:

a java program to print sum of cubes of odd nos between 1 and 10

class Oddsum

{

public static void main(String args[ ])

{

int sum=0;

for(int i=1;i<10;i++)

{

if(i℅2==1)

sum=sum+i*i*i;

}

System.out.println("sum="+sum);

}

}

Explanation:

Answered by Anonymous
0

The python program has been attached above with its output. Kindly check it!

Attachments:
Similar questions