Answer to Question #223073 in C++ for Trey

Question #223073

Can you do this one?Write a statement that assigns finalValue with the division of userNum1 by userNum2. Ex: If userNum1 is 6 and userNum2 is 2, finalValue is 3. I Dion't know what I'm doing wrong!


1
Expert's answer
2021-08-04T02:04:57-0400
#include <iostream>
using namespace std;
int main(){
    int userNum1, userNum2, finalValue;
    cout<<"Input userNum 1: "; cin>>userNum1;
    cout<<"Input userNum 2: "; cin>>userNum2;
    finalValue = userNum1 / userNum2;
    cout<<"finalValue: "<<finalValue;
    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