Thursday, 6 February 2020

Write a program to display addition of two decimal number in c++.

#include<iostream.h>
int main()
{
 float number1,number2,total;
cout<<"Enter first number: ";
cin>>number1;
cout<<"Enter second number:";
cin>>number2;
total=number1+number2;
cout<<"-----------------------Result------------\n";
cout<<"The first number is enter by you: "<<number1<<endl;
cout<<"The second number is enter by you: "<<number2<<endl;
cout<<"Addition of two number is: "<<total;
return 0;
}

No comments:

Post a Comment

How to print Specific area and avoid the some area in javascript

Hi, guys below are an example to print a specific area in javascript, also you can hide the specific area. Example: <html> <b...