Guest User

Untitled

a guest
Apr 19th, 2017
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.89 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. vector<string>names;
  4. void start(){cout<<"[user]\n\n";}
  5. void start_buffering(){string s;while(getline(cin,s))names.push_back(s);}
  6.  
  7. void start_reading1(){
  8.     for(int i = 1 ; i <= 36; i++){
  9.         cout<<"usernumber="<<i<<endl;
  10.         cout<<"usersitenumber=1\n";
  11.         i < 10? cout<<"username=team00"<<i<<endl : cout<<"username=team0"<<i<<endl;
  12.         cout<<"userfullname="<<names[i-1]<<endl;
  13.         cout<<"userdesc="<<names[i-1]<<endl;
  14.         cout<<"usertype=team\n";
  15.         i < 10? cout<<"userpassword=team00"<<i<<endl : cout<<"userpassword=team0"<<i<<endl;
  16.         cout<<"userip=\n";
  17.         cout<<"userenabled=t\n";
  18.         cout<<endl;
  19.     }
  20. }
  21.  
  22. void start_reading2(){
  23.     for(int i = 1 ; i <= 36; i++){
  24.         cout<<"usernumber="<<i<<endl;
  25.         cout<<"usersitenumber=1\n";
  26.         i < 10? cout<<"username=user"<<i<<endl : cout<<"username=user"<<i<<endl;
  27.         cout<<"userfullname="<<names[i-1]<<endl;
  28.         cout<<"userdesc="<<names[i-1]<<endl;
  29.         cout<<"usertype=team\n";
  30.         i < 10? cout<<"userpassword=user0"<<i<<endl : cout<<"userpassword=user"<<i<<endl;
  31.         cout<<"userip=\n";
  32.         cout<<"userenabled=t\n";
  33.         cout<<endl;
  34.     }
  35. }
  36.  
  37. void start_reading3(){
  38.     for(int i = 1 ; i <= 30; i++){
  39.         cout<<"usernumber="<<i<<endl;
  40.         cout<<"usersitenumber=1\n";
  41.         i < 10? cout<<"username=user"<<i<<endl : cout<<"username=user"<<i<<endl;
  42.         cout<<"userfullname="<<endl;
  43.         cout<<"userdesc="<<endl;
  44.         cout<<"usertype=team\n";
  45.         i < 10? cout<<"userpassword=user0"<<i<<endl : cout<<"userpassword=user"<<i<<endl;
  46.         cout<<"userip=\n";
  47.         cout<<"userenabled=t\n";
  48.         cout<<endl;
  49.     }
  50. }
  51.  
  52.  
  53. int main(){
  54.     freopen("input.txt", "r", stdin);
  55.     freopen("output1", "w", stdout);
  56.     start();
  57.     start_buffering();
  58.     start_reading1();
  59.     return 0;
  60. }
Add Comment
Please, Sign In to add comment