language: C++ 4.7.2 (gcc-4.7.2)
date: 160 days 17 hours ago
link:
visibility: private
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
 
int a,b;
int resultq,resultr;
 
int main ()
{
printf ("Input the first value : ");
scanf ("%d", &a);
printf ("Input the second value : ");
scanf ("%d",&b);
 
if(a<=0 ||b<=0){
printf("First and Second value should be a positive value");
 
}
else{
resultq = b / a;
resultr = b % a;
printf("The quotient of the first and second value is: %d", resultq);
printf("The remainder of the first and second value is: %d", resultr);
}
return 0;
}