Hello i am writing a program and i really need help. here is what the program is about.
1. It needs to ask a number of tickets sold.
2. persantage which goes to some other coast. This input will be entered in percent format. program must convert this to a decimal fraction, like 20% should be .20 and so on.
3. Total amount of prize money distributed.
4. Name of the avent.
The out put should be somthing like this.
1. Name of charity
2. Total revenue generated from the ticket sales. The price of each ticket is currently fixed at $5.00.
3. Total amount of administrative overhead.
4. Total amount of prize money overhead.
5. Balance remaining for the charitable fund.
the output format...
How many tickets were sold? 50000
What percentage of the ticket revenue goes to administrative costs? 2
How much total money is distributed in prizes? 15000
What is the name of the charity? Good Intentions
Charity: "Good Intentions"
Revenue generated from ticket sales: $ 250000.00
Amount deducted for administrative overhead: $ 5000.00
Amount deducted for prize money: $ 15000.00
Balance raised for charitable fund: $ 230000.00
My code is below:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
const int price=5;
string name;
int total_money, total_price;tickets, percentage;
cout<<"Enter the amount of tickets sold."<<endl;
cin>>tickets;
cout<<"What percentage of the ticket revenue goes to administrative costs?"<<endl;
cin>>percentage;
cout<<"How much total money is distributed in prizes?"<<endl;
cin>>total_money;
cout<<"What is the name of the charity?"<<endl;
getline(cin name);
cout<<"Charity:"<<name<<endl;
Can some one help me finish this please!!!



LinkBack URL
About LinkBacks


