0
why can’t I call numbers from the user? and I can’t use multiple functions... why?
UGHH. Here is an example cout << “Guess a number to end the loop.” << endl; int Getnum() //Sub function { int num; cout << “Give be a number: “; cin >> num; return num; } int main() //main function { do{ num1 = Getnum() num2 = Getnum() // calling function here }while(num1 == 0 || num2 == 0) cout << “Guess right number!” << endl; return 0; }
1 Respuesta
+ 4
I think this program is not possible on Sololearn because you on SL you have to input all numbers at once (at the beginning).
So you have to use an IDE on your PC.