- 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; }
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
+ 2
Why do you want another way?
0
I just would like to learn more.... additionally, I think there is another way