Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

C- Program of Multiplication of two numbers using Addition method




In this C program we will calculate the multiplication of two numbers(integers) using addition method and print the result, in the screen. The two numbers(integers) will be taken from the user.color>

input:

The two numbers(integers) (i.e. 5,10,7 etc.)

output:

The multiplication of the two numbers will be printed on the screen.

CODE---->


#include
#include
color>main(){
     int num1,num2,mul=0,i=1;
     printf("Enter the first number : color>");
     scanf("%dcolor>",&num1);
     printf("\nEnter the second number : color>");
     scanf("%dcolor>",&num2);
     while(i)
     {
         mul=mul+num2;
         i++;
     }
     printf("\n\n The result is : %d * %d = %dcolor>",num1,num2,mul);
     getch();
}




Don't just read, write it, run it.....color>

RESULT:color>





This post first appeared on ProgramJoy.blogspot.com, please read the originial post: here

Share the post

C- Program of Multiplication of two numbers using Addition method

×

Subscribe to Programjoy.blogspot.com

Get updates delivered right to your inbox!

Thank you for your subscription

×