《完美C++》编程练习1.2苏打水的用量
#include<iostream> using namespace std; int main() { double kill_mouse_amount,mouse_weight,diet_weight; cout<<"please input kill_mouse_amount: "; cin>>kill_mouse_amount; cout<<"please input mouse_weight: "; cin>>mouse_weight; cout<<"please input diet_weight: "; cin>>diet_weight; const double Concentration=0.001; cout<<"You must drink suda at "<<diet_weight*kill_mouse_amount/mouse_weight/0.001<<"kgs"<<endl; system("pause"); }