WAP using function template to add two numbers and display result.
#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;
}
Comments
Leave a comment