Find remainder and quotient

C Program to compute remainder and quotient

/* C Program to compute remainder and quotient */

#include
int main()
{
int dividend, divisor, quotient, remainder;
printf(“Enter dividend: “);
scanf(“%d”,&dividend);
printf(“Enter divisor: “);
scanf(“%d”,&divisor);
quotient=dividend/divisor; /* Computes quotient */     remainder=dividend%divisor; /* Computes remainder */     printf(“Quotient = %d\n”,quotient);
printf(“Remainder = %d”,remainder);
return 0;
}

Comments

comments

Leave a Reply

Your email address will not be published. Required fields are marked *