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!


Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS