标签:main i++ std cst style namespace iostream class str
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int a, b, x[21]; cin>>a>>b; printf("%d/%d=%d.", a, b, a/b); for(int i=1; i<=20; i++){ a%=b; a*=10; x[i]=a/b; } int i=20; while(x[i]==0 && i>1) i--; for(int j=1; j<=i; j++) printf("%d", x[j]); return 0; }
标签:main i++ std cst style namespace iostream class str
原文地址:https://www.cnblogs.com/Aze-qwq/p/9337792.html