c++作业1 9.22

#include <iostream>
using namespace std;
int main(){
int x=8999;
int value=x*1000/1000;
cout<<"value="<<value<<endl;
}
 

#include <iostream>
using namespace std;
int main(){
int x=8999;
int value=x/1000*1000;
cout<<"value="<<value<<endl;
}
 

#include <iostream>
using namespace std;
int main(){
int x=8999;
int value=x/1000.0*1000;
cout<<"value="<<value<<endl;
}
 

posted @ 2017-09-25 19:43  羿龙  阅读(125)  评论(0编辑  收藏  举报