Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- struct word
- {
- string country;
- string city;
- };
- int main()
- {
- const int n = 26;
- word number[n];
- for(int i=0; i < n; i++){
- cout << "country" << i+1 <<":";
- cin >> number[i].country;
- cout << "city" << i+1 << ":";
- cin >> number[i].city;
- }
- for(int i=0; i < n; i++){
- if(number[i].country == "italy")
- cout << number[i].country <<"-" << number[i].city << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement