write a program that calculates and produces these two columns sequence numbers using the three looping statements
#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;
}
Comments
Leave a comment