#include <iostream> //First any includes
using namespace std; //namespaces if used
//prototypes
float sqr(float);
float callF(float);
int main()
{
float x = 9.8;
cout << sqr(3.5) <<endl; //prints the return
//value of sqr(3.5)
cout << callF(3) <<endl; //prints 3 after making the
//function call
float z = sqr(x); //x isn't changed...
return 0;
}
void F() //Note, no prototype,
//but it's leagal because it hasn't been called.
{
cout << "Hi" <<endl;
}
float sqr(float f) //prototyped abaove
{
return f * f;
}
float callF(float f) //prototyped above
{
F();
return f;
}