SHOW:
|
|
- or go back to the newest paste.
1 | #include <iostream> | |
2 | #include <cstring> | |
3 | #include <cstdlib> | |
4 | #include <string> | |
5 | - | const int FYLKJASTAERD = 100; |
5 | + | |
6 | using namespace std; | |
7 | const int arry = 100; | |
8 | - | int FjoldiOrd; |
8 | + | |
9 | - | string Nofn[FYLKJASTAERD]; |
9 | + | |
10 | - | for (int i = 0; i < FYLKJASTAERD; i++){ |
10 | + | int howmanynames; |
11 | - | Nofn[i] = ""; |
11 | + | string names[arry]; |
12 | for (int i = 0; i < arry; i++){ | |
13 | names[i] = " "; | |
14 | - | cin >> FjoldiOrd; |
14 | + | |
15 | ||
16 | - | for(int i = 0; i < FjoldiOrd; i++){ |
16 | + | cin >> howmanynames; |
17 | - | cin >> Nofn[i]; |
17 | + | |
18 | - | } |
18 | + | for(int i = 0; i < howmanynames; i++){ |
19 | cin >> names[i]; | |
20 | } | |
21 | } |