Playground
#include <iostream> using namespace std; int f1(int a, int b, int c) { a = a+1; b = b-1; c = c + (a*b); return c; } int main() { int a=3, b=2, c=5; cout << f1(1, 1, 1) << endl; //pechati '1' cout << f1(a, 2, 0) << endl; //pechati '4' cout << f1(a, b, c) << endl; //pechati '9' //vrednostite na a, b i c se nepromeneti cout << a << " " << b << " " << c << endl; //pechati '3 2 5' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!