Write a program to print list of the numbers from 5 to 10 and their squares
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
for(int i = 5; i <= 10; i++){
cout<< "i: " << i << ", i(squared)"<< pow(i,2) << endl;
}
}
Comments
Leave a comment