I 'm new to C++ and really likely I'm doing something wrong which cause some random numbers appearing at the console before I enter a value of user input` this is the code:
#include <iostream>
using namespace std;
int zad_1(int K,int N){
cout << "Enter the value of K : " << K ;
cin >> K;
cout << "Enter the value of N : " << N ;
cin >> N;
return K, N;
}
int main(){
int K, N;
cout << zad_1(K, N) << endl;
return 0;
}
The console looks like before entering the user input "Enter the value of K : 4200347
"
4200347 this number is appearing on the console before I even enter any input