The kids Ram and Anandh are using magic numbers. For example, Ram magic number is 4 and Anandh magic number is 6. The kids exchange their magic number and display the Ram magic number is 6 and Anandh magic number is 4. Implement the above logic using function
void exchange(int &fir, int &sec)
{
int tmp = fir;
fir = sec;
sec = tmp;
}
Comments
Leave a comment