Docsity

C Program for Integer Division and Remainder, Exercises of Computer Engineering and Programming

Toggle sidebar
bg1
5
#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();
}
Remainder
docsity.com

Partial preview of the text

Download C Program for Integer Division and Remainder and more Exercises Computer Engineering and Programming in PDF only on Docsity!

#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(); }

Remainder

docsity.com