标签:style io os sp on c r size ios
【题意简述】:后一个数减去前一个数并输出。
【分析】:水
//208K 16Ms #include<iostream> using namespace std; int main() { double a; double b; bool flag = false; double ans; while(cin>>a) { if(a==999) { cout<<"End of Output"<<endl; break; } if(!flag) { b = a; flag = true; } else { ans = a-b; b = a; printf("%.2f\n",ans); } } return 0; }
POJ 2871 A Simple Question of Chemistry(水题)
标签:style io os sp on c r size ios
原文地址:http://blog.csdn.net/u013749862/article/details/39524755