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:-
Tags
Array