In: Computer Science
hello,
let me provide the code for your problem.(i will also provide the snapshot of output).
code starts here:-
#include<iostream>
using namespace std;
int main()
{
float r,t;
cout<<"enter first floating value:
";
cin>>r;
cout<<"enter second floating number:
";
cin>>t;
cout<<"the first value is
"<<r<<" and second value is
"<<t<<endl;
cout<<r<<" + "<<t<<" =
"<<r+t<<endl;
cout<<r<<" - "<<t<<" =
"<<r-t<<endl;
cout<<r<<" * "<<t<<" =
"<<r*t<<endl;
return 0;
}
code ends here
this is a simple code, we have declared two variable of type float, and prompted the user to provide two floating values.
when user provided these value , we show them four statements, showing the values, there sum , there difference and ther product.
the snapshot of output is follow:-
i hope i was able to solve your problem to a greater extent, feel free to raise your queries in comments section. I will surely respond to them.Please consider my efforts and upvote my solution.
Thanku:)