|
|
back to boardHelp me!!! I've got WA! my program: int main() { float p,q,pp,qq; scanf("%f %f",&p,&q); int i; for(i=1;i<=1000000;i++) { pp=(float)i/100*p; qq=(float)i/100*q; if((int)pp<(int)qq && pp-(int)pp>0 && qq-(int)qq>0) { printf("%d",i); return(0); } } printf("%d",0); return(0); } |
|
|