C Program To Find Multiplication Of Two Numbers

 

C Program To Find multiplication of two numbers

In this example, you will learn to calculate Multiplication Of Two Numbers Using printf() And scanf() Functions.

How Program Works ??

This Program Can Be Run By Two Ways (1) Using printf() Or (2) Using scanf() 

If You Entered a=10 And B=10 Then

We Use (*) Asterisk Operators To Calculate Multiplication

It Represent As multiplication = a * b;

where a = 10 , b = 10 And Answers Which Multiplication  = 100;

Code For  " multiplication Of Two Numbers ", Using  printf() Function.

/* Author --> HARSH PATEL */

#include<stdio.h>
void main()
{
    int a = 10; //You Can Add Any Number
    int b = 10; //You Can Add Any Number

    int c = a * b; //Now int C Calculate multiplication Of Two Numbers Which You Added On a & b

    printf("Multiplication Of Two Numbers = %d",c);
}
OUTPUT For "Multiplication Of Two Numbers ", Using  printf()  Function.

Multiplication Of Two Numbers = 10



Now Using 

scanf()

 Function.


Now Code For  " Find Multiplication Of Two Numbers ", Using  scanf() Function.

/* Author --> HARSH PATEL */

#include<stdio.h>
int main()
{
    int a,b,multiplication;
    printf("Enter First Number : ");
    scanf("%d",&a);
    printf("Enter Second Number : ");
    scanf("%d",&b);

    multiplication = a * b;
printf("Multiplication Of Two Numbers = %d",multiplication); return 0; }
OUTPUT For "Multiplication Of Two Numbers ", Using  scanf() Function.

Enter First Number : 10
Enter Second Number : 10
Multiplication Of Two Numbers = 100
  • Now Program End Without Any Error.
🖥️ Learn Programming Languages Free In Our Website Coding With Harsh 
👨‍🎓 5000+ Happy Visitor 👩‍🎓
🌐 Free Programing Examples In WebsitCoding With Harsh 

  • If Any Query Regarding Programs, Website Or More Details Email Us On Contact@CodingWithHarsh.gq

Popular posts from this blog

C Program To Print Hello World

Declare And Initialize Two Character Constants And Output It To User

C Program To Calculate Profit Or Loss