Dividing small number with large number in order to get remainder by using following code

#include <iostream>
using namespace std;

int main() {
int a,b,c;
cin>>a>>b;//suppose a=2 and b=9
c=a%b;
}
is this display wrong ans on submission

leave the #include one , it was written by mistake

Do max(a,b)%min(a,b);

1 Like