Answer to Question #258446 in C++ for dudz

Question #258446

write a program that calculates and produces these two columns sequence numbers using the three looping statements



1
Expert's answer
2021-10-30T00:39:51-0400
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    int arr[5][2]= {{1, 1}, {2, 4}, {3, 9}, {4, 16},{5,25}};
    int i, j;
    for(i=0; i<5; i++)
    {
        for(j=0; j<2; j++)
            cout<<arr[i][j]<<" ";
        cout<<endl;
    }
    cout<<endl;
    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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS