include iostream using namespace std struct taxi string number int cos

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
using namespace std;
struct taxi {
string number;
int cost;
string type;
};
int main() {
struct taxi taxi;
string name, type;
int cost;
printf("Enter number of the taxi:");
cin >> name;
printf("Enter cost of the taxi:");
cin >> cost;
printf("Enter type of the taxi:");
cin >> type;
taxi.number = name;
taxi.cost = cost;
taxi.type = type;
cout << "Taxi name: " << taxi.number << endl;
cout << "Taxi cost: " << taxi.cost << endl;
cout << "Taxi type: " << taxi.type << endl;
return 0;
}