write a program to print sum of cubes of odd number between 1 to 10
Answers
Answered by
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
0
The python program has been attached above with its output. Kindly check it!
Attachments:
Similar questions
Chemistry,
8 days ago
Math,
8 days ago
Computer Science,
17 days ago
Math,
9 months ago
India Languages,
9 months ago