Sunday, June 16, 2013

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

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

Output of the Program:

Categories:

0 comments :

Post a Comment