我在这个非常简单的程序中不断出错,我无法弄清楚原因.救命!
//This program will calculate a theater's revenue from a specific movie.
#include<iostream>
#include<iomanip>
#include<cstring>
using namespace std;
int main ()
{
const float APRICE = 6.00,
float CPRICE = 3.00;
int movieName,
aSold,
cSold,
gRev,
nRev,
dFee;
cout << "Movie title: ";
getline(cin, movieName);
cout << "Adult tickets sold: ";
cin.ignore();
cin >> aSold;
cout << "Child tickets sold: ";
cin >> cSold;
gRev = (aSold * APRICE) + (cSold * CPRICE);
nRev = gRev/5.0;
dFee = gRev - …Run Code Online (Sandbox Code Playgroud)