Advertisement
Nitin400

single D Array

Aug 6th, 2020
2,083
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int arr[50],num,i;
  6.     cout<<" Number of element:\n";
  7.     cin>>num;
  8.     cout<<"num:"<<num<<"element stored in an array";
  9.     for(i=0;i<num;i++)
  10.     {
  11.         cin>>arr[i];
  12.        
  13.     }
  14.     cout<<"enter the element storing the array";
  15.     for(i=0;i<num;i++)
  16.     {
  17.     cout<<arr[i]<<"/t";
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement