Program :
#include
#include
int main()
{
int x,y;
int result1,result2;
printf("\n Enter the dividend : ");
scanf("%d",&x);
printf("\n Enter the divisor: ");
scanf("%d",&y);
result1 = x/y;
result2 = x%y;
printf("\n The Quotient is: %d ",result1);
printf("\n The Remainder is: %d ",result2);
getch();
return 0;
}
Output ;
#include
#include
int main()
{
int x,y;
int result1,result2;
printf("\n Enter the dividend : ");
scanf("%d",&x);
printf("\n Enter the divisor: ");
scanf("%d",&y);
result1 = x/y;
result2 = x%y;
printf("\n The Quotient is: %d ",result1);
printf("\n The Remainder is: %d ",result2);
getch();
return 0;
}
Output ;
No comments:
Post a Comment