i cant figure this out | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 1

i cant figure this out

Rearrange the code to declare a function taking two integer and one char parameters. If char's value is "+", return the sum of the integer arguments. Otherwise, return the product of their multiplication. return a * b; int foo(int a, int b, char c) { return a + b; } } if (c == '+') {

8th Jan 2017, 4:48 PM
Jocelyn Boismier
Jocelyn Boismier - avatar
1 Réponse
+ 4
It appears you lack some fundamental knowledge of c++ I would suggest that you do the tutorials if you haven't. They explain everything you need to know to answer this instead of asking here. This only creates a bad programmer.
8th Jan 2017, 4:54 PM
Alex
Alex - avatar