hello I have to write a swap program for school and im on break now so i have no access to help.. the program has to look somewhat like this
#include <iostream>
using namespace std;
float lbstokg(float);
int variable;
void main ()
{
float lbs,kgs;
cout << "enter your weight in pounds";
cin >> lbs;
variable=lbstokg(lbs);
cout << "your weight in kilograms is " << variable;
system ("pause");
}
because thats what we learned for that week I know i could just put in a swap but we learned the swap function a week later so its against policy to re do something after you learned another way to do something. My professor wants the code all in the main and this is what I have so far
{
float num1,num2, number3;
cout << "enter a first number";
cin >> num1;
cout << "enter a second number";
cin >> num2;
float num1tonum2 (float number3);
float num2tonum1=number3;
cout << number3;
system ("pause");
}
all I need it to do is display the second number than the first number.
I think im close
thanks for the help