- 1

Kindly, is there another way to write this program?

#include <iostream> #include<string> using namespace std; void issue_ticket(int flight_no ,string paname); int main() { string paname; cout<<"Enter your name as written in your passport"<< endl; cin>> name; issue_ticket (125 , nmae) cout<<"Enter your name as written in your passport"<< endl; cin>> name; issue_ticket (125 , nmae) cout<<"Enter your name as written in your passport"<< endl; cin>> name; issue_ticket (125 , nmae) } void issue_ticket(int flight_no ,string paname) { static int ticket_no = 0; cout<<"\t\t ***************** "<<endl; cout<<"flight no : "<<flight_no<<endl; cout<<"ticket no :"<< ++ ticket_no<<endl; cout<<"issue for :" << paname <<endl; }

23rd Apr 2020, 10:38 PM
Morsal
Morsal - avatar
3 Antworten
+ 4
Share a saved code link instead, And specify a relevant language in your thread tags https://www.sololearn.com/post/75089/?ref=app https://www.sololearn.com/Discuss/333866/?ref=app
23rd Apr 2020, 10:42 PM
Ipang
+ 2
Why do you want another way?
23rd Apr 2020, 10:42 PM
HonFu
HonFu - avatar
0
I just would like to learn more.... additionally, I think there is another way
23rd Apr 2020, 11:02 PM
Morsal
Morsal - avatar