Write a program that read two float number a and b from the user, and prints sum of these numbers.
Source code
#include <iostream> using namespace std; int main() { float a, b; cout<<"\nEnter a: "; cin>>a; cout<<"\nEnter b: "; cin>>b; float sum=a+b; cout<<"\nThe sum of "<<a<<" and "<<b<<" = "<<sum; return 0; }
Output
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments