Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- struct Chara {
- string name;
- int age;
- int score;
- };
- int main() {
- vector<Chara> d;
- while (cin) {
- Chara chara;
- cout << "NAME AGE SCORE: ";
- cin >> chara.name >> chara.age >> chara.score;
- if (chara.name == "0") break;
- d.push_back(chara);
- }
- for (const Chara& c : d)
- cout << c.name << " " << c.age << " " << c.score << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement