Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4. #include <windows.h>
  5. #include <math.h>
  6. #include <vector>
  7. #include <algorithm>
  8. #include <conio.h>
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     vector <string> names;
  14.     vector <int> scores;
  15.  bool isOver=0;
  16.     while (!isOver){
  17.         string sName;
  18.         cin>>sName;
  19.         if (sName=="No more")
  20.         {
  21.         isOver=1;
  22.          for     (int i; i < scores.size(); ++i)
  23.                 cout << names[i] << scores[i] << endl;
  24.         }
  25.  
  26.         else {
  27.             names.push_back(sName);
  28.             int nScore;
  29.             cin>>nScore;
  30.             scores.push_back(nScore);
  31.         }
  32.     }
  33.    
  34.          
  35.     system("pause");
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement