divide quotint by divisor and assign value of remaider to quotient
Sat Oct 28 2023 07:39:17 GMT+0000 (Coordinated Universal Time)
Saved by
@usman_hamed
#include<stdio.h>
int main()
{
int dsr;
int qtnt;
int dnd ;
printf("enter dividend :");
scanf("%d",&dnd);
printf("enter divisor :");
scanf("%d",&dsr);
qtnt=dnd/dsr;
printf("quotient is %d\n",qtnt);
int rem=qtnt%dsr; //or insted of line 13 14 15 use qtnt%=dsr;
printf("remaider is : %d\n",rem);
qtnt=rem;
printf("quotient is now : %d\n",qtnt);
}
content_copyCOPY
Comments