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!
#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;
}
Comments
Leave a comment