Monday, 4 November 2013

C program to find quotent and remainder of 2 integers

C program to find quotent and remainder of 2 integers:

#include<stdio.h>
#include<conio.h>
main()
{
int n,t,quot,rem;
clrscr();
printf("\nEnter two numbers: \t");
scanf("%d%d",&n,&t);
quot=(n/t);
rem=(n%t);
printf("Quotient is: %d",quot);
printf("Remainder is: %d", rem);
getch();
return 0;
}

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan