Friday, 4 April 2014

How to Multiply Two Numbers in C Program

Multiplication in C Programs is very easy as it is in Addition, subtraction because pattern is same and also syntax is same. Just one operation is different and that is multiply. I have put all my efforts while creating this blog. However there are lots of other blogs websites are available for online learning of C Language programs but almost all are based on same complex method of teaching. But my teaching method id quite different as you can see

C Program to Multiply Two Numbers

#include<stdio.h>
main()
{
     int var1,var2,answer;
     printf("\nEnter First Value:= ");
     scanf( "%d",&var1);

     printf("\nEnter Second Value:= ");
     scanf( "%d",&var2);

     answer=var1*var2;
     printf("\Answer Is:= %d ",answer);
}

Output of the program

Output of Multiply



No comments:

Post a Comment