// 偷窃.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <stdlib.h>
//#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
double money;
while(-1)
{
scanf("%lf",&money);
//12.56 125.6+0.5=126.1 12.6
//12.54 125.4+0.5=125.9 12.5
//double result=((int)(money*10+0.5))/10.0-money;
//123.336 12333.6+0.5=12334.1 123.34
//123.333 12333.3+0.5=12333.8 123.33
double result=((int)(money*100+0.5))/100.0-money;
//四舍五入
result>0?printf("进位\n"):printf("不进位\n");
}
system("pause");
return 0;
}
//double moneys=money-((int)(money*10+0.6))/10.0;
//四舍三入
//double moneys=money-((int)(money*10+0.7))/10.0;
//三舍二入
//
#include "stdafx.h"
#include <stdlib.h>
//#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
double money;
while(-1)
{
scanf("%lf",&money);
//12.56 125.6+0.5=126.1 12.6
//12.54 125.4+0.5=125.9 12.5
//double result=((int)(money*10+0.5))/10.0-money;
//123.336 12333.6+0.5=12334.1 123.34
//123.333 12333.3+0.5=12333.8 123.33
double result=((int)(money*100+0.5))/100.0-money;
//四舍五入
result>0?printf("进位\n"):printf("不进位\n");
}
system("pause");
return 0;
}
//double moneys=money-((int)(money*10+0.6))/10.0;
//四舍三入
//double moneys=money-((int)(money*10+0.7))/10.0;
//三舍二入