#include <stdio.h>
#include <conio.h>
void div(int a, int b)
{
int i,result=0,rest=0,p;
for(i=1;i=a;i++)
if((i*b)<a)
result=i;
else
p=result*b;
rest=a-p;
printf("The quotient is %d and the reminder is %d",result,rest);
return;
}
int main()
{
int a,b;
printf("Please type the dividend: \n");
scanf("%d",&a);
printf("Now, type the divisor. REMEMBER TO CHOOSE A SMALLER NUMBER: \n");
scanf("%d",&b);
div(a,b);
return 0;
}
Here it is. To be honest I really thought the code was ok, because every time it was wrong the project didn run at all. Sorry to bother