Answer to Question #30811 in C++ for princeyawar
Write a program that calculates square and cube of numbers from 15 to 25.
1
2013-05-24T09:06:06-0400
#include <stdio.h>
int main () {
for (int i = 15; i <= 25; i++)
printf("number %d:\nsquare: %d\ncube: %d\n\n", i, i * i, i * i * i);
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment