一个c++小程序,错在哪里?目的是输入a,b,c计算a/b的值,保留c位小数,c<100,a<1000000,b<1000000

日期:2016-11-22 13:44:33 人气:1

一个c++小程序,错在哪里?目的是输入a,b,c计算a/b的值,保留c位小数,c<100,a<1000000,b<1000000

没看懂你的代码,但总觉得写复杂了。我写了一个供你参考…… //#include "stdafx.h"//vc++6.0加上这一行.#include using namespace std;int main(void){ int a,b,c,i; while(1){ cout > a >> b >> c; if(a=0 && b>0 && a>=0) b
    A+
热门评论