Array program of enter and print 10 numbers in c++

 Que- Make a program for array to enter and print 10 numbers?

#include<iostream>
using namespace std;

int main (){
 
   int num[10],num1[10];
for (int i=0; i<10; i++)
{
   cout<<"enter the value for num [ "<<i<<"] is :";
   cin>>num1[i];
}
for (int i=0; i<10; i++)
{
   cout<<"the value for num1 [ "<<i<<"] is :"<<num1[i]<<endl;
}

return 0;
}

Result:-



Post a Comment

Previous Post Next Post