#include<iostream> using namespace std; int main() { int x=8999; int value=x*1000/1000; cout<<"value="<<value<<endl; return 0; }
#include<iostream> using namespace std; int main() { int x=8999; int value=x/1000*1000; cout<<"value="<<value<<endl; return 0; }
#include<iostream> using namespace std; int main() { int x=8999; int value=x/1000.0*1000; cout<<"value="<<value<<endl; return 0; }
时间: 2024-10-18 16:08:19