
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A c program code for calculating the quotient and remainder of an integer division operation. The user is prompted to input the dividend and divisor, and the program displays the quotient and remainder. The user can choose to continue the calculation by entering 'y' or exit by entering 'n'.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

#include<stdio.h> #include<conio.h> void main (void) { int num,div; float rem,quo; char a; clrscr(); do { printf ("\nEnter the divident\n"); scanf ("%d",&num); printf ("Enter the divisor\n"); scanf ("%d",&div); rem=num%div; quo=num/div; printf ("The remainder is: %f",rem); printf ("The quotent is: %f",quo); printf ("Do you want to continue (y/n)?\n"); a=getche(); } while (a=='y'); getch(); }