I
I
Insanchik2018-10-14 21:58:37
C++ / C#
Insanchik, 2018-10-14 21:58:37

Problem with passing variable value from one function to another?

(The problem is that I can’t correctly pass the value of the szukana variable from the int pobieranie2
function to the void obliczanie function, so that I can then use it in calculations in the same function. Please help, I will be very grateful if you have any questions - I’m ready to answer) The place of a specific number displays, roughly speaking, incomprehensible characters.
CODE: (not all, only functions and part of MAIN)
void pobieranie(int n,double x[],double y[])
{
for(int i=0; i>x[i];
cout<<"Specify y" < >y[i];
}
}
//====================================== =============================
int pobieranie2(int n, double x[],double y[])
{
double szukana;
cout<<"Podaj wartosc x, dla ktorej bedzie liczona wartosc P(x): ";
cin>>szukana;
if(szukana>=x[0] && szukana<=x[n-1])
{
cout<<"Wartosc x znajduje sie w przedzile ["<>n;
double szukana;
doublex[n];
double y[n];

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question