-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path7.cpp
34 lines (30 loc) · 801 Bytes
/
7.cpp
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
#include <iostream>
using namespace std;
main(){
string movie;
float adticket;
float cdticket;
float tadticket;
float tcdticket;
float donation;
float total;
float mdonation;
float afdonation;
cout << "Enter movie name is ";
cin>>movie;
cout << "Enter adult Ticket Price ";
cin>>adticket;
cout << "Enter child Ticket Price ";
cin>>cdticket;
cout << "Enter number of total Adult ticket Sold ";
cin>>tadticket;
cout << "Enter number of total Child ticket ";
cin>>tcdticket;
cout << "Enter percentage to donate";
cin>>donation;
total = (adticket*tadticket)+(cdticket*tcdticket);
cout << "Your total amount generated is "<<total<<endl;
mdonation = (total*donation)/100;
afdonation = (total)-(mdonation);
cout << "Your total amount after donation is "<<afdonation;
}