Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to do multiplication of two given numbers

Posted By: Reginald Fischer     Category: C Programming     Views: 3431

Write a program to do multiplication of two given numbers.

Code for Program to do multiplication of two given numbers in C Programming

#include <stdio.h>

void main()
{

#include <stdio.h>

void main()
{


int number1,number2,number3;

        printf("Enter the first number:");
        if(scanf("%d",&number1)==1)
        {
                printf("Enter the second number:");
                if(scanf("%d",&number2)==1)
                {
                number3=number1*number2;
                printf("The multiplication is:%d",number3);
                }
                else
                {
                        printf("error,enter correct value");
                }
        }
        else
        {
                printf("error,enter correct number");
        }
}


=========================================OUTPUT===================================

Enter the first number:22
Enter the second number:3
The multiplication is:66
  
Share: 


Didn't find what you were looking for? Find more on Program to do multiplication of two given numbers Or get search suggestion and latest updates.

Reginald Fischer
Reginald Fischer author of Program to do multiplication of two given numbers is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!