It’s a multiplication of two numbers C program that accepts two numbers from the user and performs the multiplication operation, and print result on the screen.
To understand this program, it’s better you should know the following topics:
Program (1): to multiply two numbers entered by the user.
#include<stdio.h> #include<conio.h> void main() { // variable declaration float a, b, mul; // use printf() to display message printf("Enter two numbers : \n"); // use scanf() to store two float values in variables a and b scanf("%f %f",&a,&b); //calculate multiplication and store multiplication result in variable mul mul = a*b; printf("Multiplication is %f",mul); getch(); }
Output (1)
Enter two numbers : 23 5 Multiplication is 115.000000