Sesiones de PyR
Reminder 14 quotient 48 =?
-4 Votos
10 Respuestas#include <iostream>
using namespace std;
int sum(int a, int b=42) {
int result = a + b;
return (result);
}
int main() {
int x = 24;
int y = 36;
//calling the function with both parameters
int result = sum(x, y);
cout << result << endl;
//calling the function without b
result = sum(x);
cout << result << endl;
return 0;
}
why is da last function cout 66 and not 48 isn't it suppose to add 24+24?
1 Voto
6 RespuestasEn tendencia hoy
Need a personal tutor
1 Votes
Fix code
0 Votes
..
1 Votes
Fast coding (mobile)
1 Votes
Software to write and run codes
1 Votes
Add lua
0 Votes
Beginner_to_SoloLearn
1 Votes