السلام عليكم أخوي تيمون عندي سؤال في هالكود........
#include<iostream>
using namespace std;
void gettemp(int&);
void printactivity(int);
int main()
{
int tempreture;
gettemp(tempreture);
printactivity(tempreture);
return 0;
}
void gettemp(int& temp)
{
cout<<"Enter the outside tempreture"<<endl;
cin>>temp;
cout<<" the current tempreture is"<<" "<<temp<<endl;
}
void printactivity(int temp)
{
cout<<" the recommended activity is"<<endl;
if(temp>85)
cout<<"swimming"<<endl;
else if(temp>70)
cout<<"tennis"<<endl;
else if(temp>32)
cout<<"golf."<<endl;
else if(temp>0)
cout<<"skiing"<<endl;
else
cout<<"dancing"<<endl;
}
إذا ما سوينا pass by reference شو بستوي؟؟؟؟؟؟؟؟؟؟