Answer to Question #272501 in C++ for jhufyghgh3

Question #272501

WAP using function template to add two numbers and display result.


1
Expert's answer
2021-11-28T05:25:48-0500
#include <iostream>
using namespace std;
int main(){
    float a;
    float b;
    cout<<"Enter first number: ";
    cin>>a;
    cout<<"Enter second number: ";
    cin>>b;
    cout<<a<<" + "<<b<<" = "<<a + b<<endl;
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS