C++ Program to Multiply two Floating Point Numbers

C++ Program to Multiply two Floating Point Numbers

#include<iostream>
using namespace std;	

int main() 
{
    double num1;
    double num2;
    double total;
    cout << "Enter first number :";
    cin >> num1;
    
    cout << "Enter second number :";
    cin >> num2;
        
    total = num2 * num1;
    cout  << "Total is :" << total;
    
    return 0;
}

Result

C++ Program to Multiply two Floating Point Numbers
C++ Program to Multiply two Floating Point Numbers

2 thoughts on “C++ Program to Multiply two Floating Point Numbers”

  1. you have mistake
    you need Multiply two Floating Point Numbers
    but you add number
    must number display = 1552.32 not 81.2

    Reply

Leave a Comment