Sunday, June 16, 2013

With basic knowledge on input-output function of C. We can now perform simple arithmetic programs, like in this example Division Program.

Source Code:
#include<stdio.h>
main()
{
int num1, num2;
float quotient;
clrscr();
printf("Enter two numbers to perform Division:");
scanf("%d %d", &num1, &num2);
quotient=num1/num2;
printf("The quotient of two numbers is: %.2f",quotient);
getch();
}

Output of the Program:




Categories:

0 comments :

Post a Comment