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; }

10th Mar 2019, 4:11 PM
Captain Muffy
Captain Muffy - avatar
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.
10th Mar 2019, 7:47 PM
Denise Roßberg
Denise Roßberg - avatar