¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuitaSesiones de PyR
#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 RespuestasWrite a C program to mimic the popular game tic-tac-toe for two players. It takes positions as input from both the players and put appropriate symbols for respective players. Eventually it checks the winning combinations for the players and prints the result in favor of Player one or player two or declares draw.
0 Votos
2 RespuestasEn tendencia hoy
Comparing code coach solutions
3 Votes
Automatation python
1 Votes
General python
0 Votes
view challenge analytics
2 Votes
Where to use
0 Votes
Coding path
0 Votes