this time i have tried to correct the code , and look what i get as the error; it says that missing function header (old-style formal list ?)
//this program demonstrates the use of function
#include <iostream>
using namespace std;
void displayLine ();
void main ();
{
float numberInput = 0,0;
float numberSquared=0,0;
float numberHalved =0,0;
cout <<" Enter a number : ";
cin >> numberInput ;
numberSquared = numberInput * numberInput ;
numberHalved = numberInput / 2 ;
displayLine ();
cout <<"Result of Calcutations : " << endl ;
cout <<"Square of the Number : " << numberSquared << endl;
cout <<"Half of the Number : " << numberHalved << endl;
system("pause");
}
void displayLine ()
{
cout <<" --------------------------- : " << endl;
}