With are the diferents betleem int function and void function.At what type of program shoul i use one of them | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

With are the diferents betleem int function and void function.At what type of program shoul i use one of them

6th Jul 2016, 10:55 AM
Marin Denisa-teodora
Marin Denisa-teodora - avatar
3 Answers
0
Example: void jump(). This function just makes the player jump, and does not need to return anything. int getPlayerLife(). This functions returns the life of the player, and you want to return a value, in this case, an int.
6th Jul 2016, 11:19 AM
Garme Kain
Garme Kain - avatar
0
tu ani you 😃
6th Jul 2016, 11:23 AM
Marin Denisa-teodora
Marin Denisa-teodora - avatar
0
thank you
6th Jul 2016, 11:23 AM
Marin Denisa-teodora
Marin Denisa-teodora - avatar