Explore a little.C ProgrammingC++HTMLVisual BasicSystem AnalysisE-CommerceBCA Notes
LEARN SOMETHING NEW

C Program to Multiply two Floating Point Numbers

Read4BCA learning libraryFree access

C Program to Multiply two Floating Point Numbers

//C Program to Multiply two Floating Point Numbers
//Header Files
#include<stdio.h>
#include<conio.h>

//main function
//where the execution of program begins
void main()
{

double a, b, mult;
clrscr();
printf("Enter two numbers: ");

// Stores two floating point numbers in variable a and b respectively
scanf("%lf %lf", &a, &b);

// Performs multiplication and stores the result in variable mult
mult = a * b;

// Result up to 2 decimal point is displayed using %.2lf
printf("mult = %.2lf", mult);
getch();

}

Output

C Program to Multiply two Floating Point Numbers example

You can also see a video how to run this program

This lesson preserves the original Read4BCA material. Some programming examples use older tools and syntax. View original page.