#include <iostream>
#include <cmath>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
    double x,y;
    long long num;
    do{
        cout<<"x=";
        cin>>x;
    }while(x>=1||x<=0);
    num=1;
    do{
        num*=10;
        y=x*num;
    }while(fabs(y-(int)y>1e-9));
    cout<<int (y)<<endl;
    return 0;
}

 

posted on 2023-07-26 09:09  爱吃泡面的皮卡  阅读(49)  评论(0编辑  收藏  举报