Advertisement
Guest User

Untitled

a guest
Mar 8th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. class user{
  5. public:
  6.     string name;
  7.     string password;
  8. };
  9.  
  10. int main(){
  11.     user one[10];
  12.     int n;
  13.     cout<<"Enter number of user: ";
  14.     cin>>n;
  15.  
  16.     for(int i=0;i<n;i++){
  17.         cout<<"username :" ;
  18.         cin>>one[i].name;
  19.         cout<<"password : ";
  20.         cin>>one[i].password;
  21.         cout<<"\n";
  22.     }
  23.  
  24.     for(int i=0;i<n;i++){
  25.         cout<<one[i].name<<" ";
  26.         cout<<one[i].password<<endl;
  27.     }
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement