-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello.cpp
More file actions
42 lines (41 loc) · 1.09 KB
/
hello.cpp
File metadata and controls
42 lines (41 loc) · 1.09 KB
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
36
37
38
39
40
41
42
void service::set()
{
ofstream file;
string s;
s = wagon::set_info();
cout << "Enter the model name of wagon ";
cin >> model_name;
s = s + model_name + " ";
cout << "Enter the seats available in wagon ";
cin >> seater;
s = s + to_string(seater) + " ";
cout << "Enter the mileage of the wagon ";
cin >> mileage;
s = s + to_string(mileage) + " ";
file.open("service.txt", ios::app);
file << s;
file << "\n";
file.close();
}
void sedan::set()
{
ofstream file;
string s;
s = wagon::set_info();
cout << "Enter the model name of wagon ";
cin >> model_name;
s = s + model_name + " ";
cout << "Enter the seats available in wagon ";
cin >> seater;
s = s + to_string(seater) + " ";
cout << "Enter the mileage of the wagon ";
cin >> mileage;
s = s + to_string(mileage) + " ";
cout << "Enter the bootspace available in wagon ";
cin >> bootspace;
s = s + to_string(bootspace);
file.open("sedan.txt", ios::app);
file << s;
file << "\n";
file.close();
}