TOPIC

why 10% error?? plz solve this what can i do

mursalin_ahmed asked 11 months ago

include include<bits/stdc++.h>

using namespace std; int main() { int a,b; cin>>a>>b; if(a>0) { cout<<a/b<<" "<<a%b<<endl; } else if(a<0) { if(b<0) { int i=1; int sum=0; for(;;) { sum=ib; if(sum<a) {sum=abs(sum);cout<<i<<" "<<sum+a<<endl; break;} else i++; } } else { int j=-1; int sum1=0; for(;;) { sum1=jb; if(sum1<a) {sum1=abs(sum1);cout<<j<<" "<<sum1+a<<endl; break;} else --j; } } } return 0; }

Remember not post solutions. Your post may be reviewed by our moderators.