主题:新手求助
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
unsigned double money=0;
cout<<"enter a money ";
cin>>money;
money=static_cast<int>(money*100);
cout<<"money include "<<money/25<<25;
cout<<"money include "<<money/10<<10;
cout<<"money include "<<money/5<<5;
cout<<"money include "<<money<<1;
int integer=money/100;
int dime=(money-integer*100)/10;
int cent=money-integer*100-dime*10;
cout<<"you entered "<<integer<<integer==1?"dollar":"dollars"<<dime<<dime==1?"dime":"dimes"<<cent<<cent==1?"cent":"cents";
system("PAUSE");
return EXIT_SUCCESS;
}能把这个程序错误的原因告诉我吗?devc++一直提示第一句就错了,后面也有错误,希望指正
#include <iostream>
using namespace std;
int main()
{
unsigned double money=0;
cout<<"enter a money ";
cin>>money;
money=static_cast<int>(money*100);
cout<<"money include "<<money/25<<25;
cout<<"money include "<<money/10<<10;
cout<<"money include "<<money/5<<5;
cout<<"money include "<<money<<1;
int integer=money/100;
int dime=(money-integer*100)/10;
int cent=money-integer*100-dime*10;
cout<<"you entered "<<integer<<integer==1?"dollar":"dollars"<<dime<<dime==1?"dime":"dimes"<<cent<<cent==1?"cent":"cents";
system("PAUSE");
return EXIT_SUCCESS;
}能把这个程序错误的原因告诉我吗?devc++一直提示第一句就错了,后面也有错误,希望指正