Answer to Question #286360 in C++ for A lawal

Question #286360

Write a program to print list of the numbers from 5 to 10 and their squares


1
Expert's answer
2022-01-10T14:55:22-0500
#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;
    }
}

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!

Comments

No comments. Be the first!

Leave a comment