Answer:
C++ code
Step-by-step explanation:
C++ code
#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
double first,second,third;
cout<<"Enter first Decimal :";
cin>>first;
cout<<"Enter second Decimal :";
cin>>second;
cout<<"Enter third Decimal :";
cin>>third;
cout<<"Sum of three decimal = "<<first+second+third;
return 0;
}
Code Explanation
Decimal numbers are stored in double data types.
So first declare three variables and then get input by using cin from command line.
At the end display there sum by addition of all three variables.
Output
Enter first Decimal :10.22
Enter second Decimal :20.22
Enter third Decimal :9.99
Sum of three decimal = 40.43