Answer to Question #343140 in C++ for drew1111

Question #343140

Create a program that will ask for two float numbers and print its sum, difference, product, quotient and its remainder.


1
Expert's answer
2022-05-22T18:10:14-0400



#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    float num1,num2;
    cout<<"Enter the first number:";
    cin>>num1;
    cout<<"Enter the second number:";
    cin>>num2;
    
    cout<<"The sum is:"<<num1+num2<<endl;
    cout<<"The differnce is:"<<num1-num2<<endl;
    cout<<"the product is:"<<num1*num2<<endl;
    cout<<"The quotient is:"<<num1/num2<<endl;
    cout<<"The remainder is:"<<remainder(num1, num2)<<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