我需要帮助尽管我通过ideone传递代码,它似乎工作,它是数据类型可能吗?我需要帮助ttlTx变量显示为0血流冲刷的输出。帮助赞赏!错误的输出简单的税计算器
/*
*/
//Libraries
#include <cstdlib>
#include <iostream>
using namespace std;
//Global Constants
//Functioning Prototypes
//Execution Begins Here
int main(int argc, char **argv){
//Variables
float purchse, ttlTx, stateTx, cntyTx, total;
//Process
purchse= 52;
stateTx= 0.04; //state tax
cntyTx= 0.02; //county tax
ttlTx= purchse*(stateTx + cntyTx); //total tax
total = purchse+ttlTx;
//output
cout<<"the total tax on a $"<< purchse<<" is $"<<
ttlTx<<endl;
cout<<"which brings the total to $" << total<<endl;
//Exit Stage Right
system("PAUSE");
return EXIT_SUCCESS;
}
流血?那是什么? – bmargulies
Bloodshed Dev-C++,IDE - 请参阅http://www.bloodshed.net/devcpp.html。 – paxdiablo
对不起,我的意思是DEV-C++,Bloodshed是软件的名称 – noobUser