c语言 两个数的余数和商
#include<iostream.h>
#include<conio.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,q,r;
cout<<“Enter two numbers:”;
cin>>a>>b;
if(a>b)
{
q=a/b;
r=a%b;
cout<<“nQuotient=”<<q;
cout<<“nRemainder=”<<r;
}
else
cout<<“nFirst no. should be greater than second no….!!!”;
getch();
}
翻译自: https://www.thecrazyprogrammer.com/2011/03/c-program-to-find-quotient-and.html
c语言 两个数的余数和商