Is it possible for them to return more than one value without using any advanced tools.
I tried to do it in this code, but only one value in the function was printed:
Code:#include<iostream>
int main()
{
float function(float,float);
float a=3.4,b=7.8;
cout<<a<<endl<<b<<endl;
cout<<function(a,b);
return 0;
}
float function(float a,float b)
{
a=32.2;
b=90.2;
return a;
return b; // I also tried "return a,b;" with no success
}