Playground
#include <iostream> using namespace std; int f1(int const &x, int const &y) { x = x+1; //greshka, nedozvoleno y = y*3; //greshka, nedozvoleno return x+y; } int f2(const int &x, const int &y) { x = x+1; //greshka, nedozvoleno y = y*3; //greshka, nedozvoleno return x*y; } int main() { int a = 30, b = 4; cout << f1(a, b) << endl; cout << f2(a, b) << endl; return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!