Hello world, i would like to ask some help regarding about my coding,

Hello world, i would like to ask some help regarding about my coding, i have done it, but it mention there is an error which i need to correcct it, and i did change but it still shows an error..I really appreciate those who can lend ur time to help me

#include <iostream>
#include<string>
#include <iomanip>
#include<fstream>
using namespace std;

double const pi=3.142;
void mainMenu(char&);
double getfavour(char&type);//choices to get favourite favour other than size
double getData(char&);
double calcArea(double&,char&);
double calcPrice(double&,char&,double&);
void showBalance(double&);


int main()
{
double dimension,area,total;
char type;
cout<<"Welcome to Trendy pizza shop"<<endl;
do
{
cout<<setprecision(2)<<fixed;
type=getfavour(type);
dimension=getData(type);
area=calcArea(dimension,type);
total=calcPrice(area,type,dimension);
showBalance(total);
mainMenu(type);
}while (type=='O'||type=='o');
return 0;
}

void mainMenu(char&type)
{
cout<<" Do you wish to continue with your order or quit?\n"
<<"<O> for order, <Q> for quit\n";
cin>>type;

while (type!='O'&&type!='o'&&type!='Q'&&type!='q')
{
cout<<"pls re-enter : ";
cin>>type;
}
}

double getfavour(char&type)
{
char ;
cout<<"Please select favour pizza according to choices below : "<<endl<<endl;
cout<<"H\tHaiwaii chicken"<<endl;
cout<<"F\tFamous Wets-Night Pizza"<<endl;
cout<<"V\tVegetarian"<<endl;
cout<<"T\tTurkey Ham & Mushroom"<<endl;
cout<<"C\tClassic"<<endl;
cout<<"B\tBeefeater"<<endl;
cout<<"S\tHot & Spicy"<<endl;
cout<<"Enter the pizza that you are prefer : ";
cin>>type;

while (type!='H'&&type!='h'&&type!='F'&&type!='f'&&type!='V'&&type!='v'&&type!='T'&&type!='t'&&type!='C'&&type!='c'&&type!='B'&&type!='b'&&type!='S'&&type!='s')
{
cout<<"Please reenter the favour pizza ";
cin>>type;
}
if (type=='H'||type=='h')
cout<<"\t**Haiwaii Pizza**"<<endl;
else if (type=='F'||type=='f')
cout<<"\t**Fomous Wetz-Night Pizza**"<<endl;
else if (type=='V'||type=='v')
cout<<"\t**Vegetarian Pizza**"<<endl;
else if (type=='T'||type=='t')
cout<<"\t**Turkey Ham & Mushroom"<<endl;
else if (type=='C'||type=='c')
cout<<"\t**Classic Pizza**"<<endl;
else if (type=='B'||type=='b')
cout<<"\t**Beefeater Pizza**"<<endl;
else if (type=='S'||type=='s')
cout<<"\t**Hot & Spicy Pzza**"<<endl;

return type;

}

double getData(char& type)
{
double dimension;

cout<< "\nWhat the pizza type that u would like to have?\n";
cout<<"<C>.circular\n"
<<"<R>.rectangular pizza\n"
<<"<H>.for hexagonal pizza\n"
<<"Enter your choice:";
cin>>type;
cout<<endl;

while (type!='c'&&type!='C'&&type!='r'&&type!='R'&&type!='h'&&type!='H'&&type!='e'&&type!='E')
{
cout<<" Please enter a valid choice menu: "
<<endl;
cin>> type;
}

if (type=='C'||type=='c')
cout<< "Pls enter the diameter in inch for the circular pizza that u wish to ordered\n";

if (type=='R'||type=='r')
cout<< "Pls enter the width in inch for the rectangular pizza that u wish to ordered\n";

if (type=='H'||type=='h')
cout<< "Pls enter the width in inch for the hexagonal pizza that u wish to ordered\n";

cin>>dimension;

while (dimension<=0)
{
cout<<"Invalid Input!! Please Reenter : ";
cin>>dimension;
}
while (dimension >=100)
{
cout<<"\nOver Dimension,We Do Not Serve Dimension Exceed 100\""<<endl;
cout<<"Please Order With Smaller Dimension : ";
cin>>dimension;
}

return dimension;
}

double calcArea(double & dimension, char& type)
{
double x=3,area;

if (type=='C'||type=='c')
{
area=dimension*dimension*(pi/4);
cout <<"\nThe area of ur pizza is:\t"<<area;
}
if (type=='R'||type=='r')
{
area=dimension*dimension;
cout <<"\nThe area of ur pizza is:\t"<<area;
}
if (type=='H'||type=='h')
{
area=(dimension*dimension)*(3*sqrt(x)/2);
cout <<"\nThe area of ur pizza is:\t"<<area;
}
cout<<endl;
return area;
}

double calcPrice(double &area,char&type,double&dimension)
{
double price=0.20*area;
string shape;
if (type =='C'|| type =='c')
shape="Circular";
if (type =='R'|| type =='r')
shape="Rectangular";
if (type =='H'|| type =='h')
shape="Hexagonal";

cout<<"Price per unit of pizza is RM 0.20 per square inch.\n\n";
cout<<"\nPizza "<<shape<<" "<<setprecision(0)<<dimension<<setprecision(2)<<"''\t\tRM"<<price;

double s=price,
tax= s*0.025,
charge=s*0.05,
total=s+tax+charge;
cout<<"\nGovt.tax(2.5%)\t\t\tRM" <<setprecision(2)<<fixed<<tax
<<"\nServ.charge(5%)\t\t\tRM"<<setprecision(2)<<fixed<<charge
<<"\nAmount Due\t\t\tRM"<<setprecision(2)<<fixed<<total;
cout<<endl<<endl;
return total;
}

void showBalance(double& total)
{
double paid,bal;
int find,change1,change2,change3,change4,change5,
change6,change7,change8,change9;

cout<<"\nAmount paid\t\t\tRM";
cin>>paid;

while (total>paid)
{
cout<<"Pls pay again:\t\t\tRM";
cin>>paid;
}
cout<<"Amount Due\t\t\tRM"<<total
<<"\n=====================================";
bal=paid-total;
cout<<"\nBalance \t\t\tRM"<<bal<<endl;

find=bal*100;
if(find>=5)
{
find=find+0.01;
}
change1=find / 5000;
change2=(find%5000)/1000;
change3=(find%5000%1000)/500;
change4=(find%5000%1000%500)/100;
change5=(find%5000%1000%500%100)/50;
change6=(find%5000%1000%500%100%50)/20;
change7=(find%5000%1000%500%100%50%20)/10;
change8=(find%5000%1000%500%100%50%20%10)/5;
change9=(find%5000%1000%500%100%50%20%10%5)/1;

cout<<"\n Here your changes:\n"
<<"\tRM50\t"<<change1<<endl
<<"\tRM10\t"<<change2<<endl
<<"\tRM5\t"<<change3<<endl
<<"\tRM1\t"<<change4<<endl
<<"\t50sen\t"<<change5<<endl
<<"\t20sen\t"<<change6<<endl
<<"\t10sen\t"<<change7<<endl
<<"\t5sen\t"<<change8<<endl
<<"\t1sen\t"<<change9<<endl
<<endl<<endl;
}
Could you explain your error please?

also please put your code inside code, it makes it look nice!
i forgot to put it in, sorry, here are the errors that i get
warning: converting to `char' from `double'
error: declaration does not declare anything
cpp:165: error: `sqrt' was not declared in this scope
cpp:216: warning: converting to `int' from `double'
.cpp:219: warning: converting to `int' from `double'

Im so confused what should i do to fix it...
below are the question =
Function
Description
main()
contain function calls for the following functions.
mainMenu()
display the main menu; customers may continue or exit the program at this stage.
Do you wish to continue with your order or quit?
<O>rder <Q>uit
getData()
get the pizza type and appropriate dimension from customers.
Type: <C>ircular / <R>ectangular / <H>exagonal
Dimension: c / r / h (refer diagram)
calcArea()
calculate the area of the selected pizza type, based on the dimension given (c/r/h)
calcPrice()
calculate and display the price of the pizza. Add 2.5% as the government tax and 5% as the service charge.
Pizza (circular) 12” RM 22.62
Govt. tax ( 2.5 %) RM 0.57
Serv. charge (5%) RM 1.13
Amount Due RM 23.32
(Price per unit of pizza is RM 0.20 per square inch.)
c
circular
r
rectangular
h
hexagonal

showBalance()
get and display the amount paid by the customer. display the balance amount in terms of the various dominations.
Amount Paid RM 50.00
Amount Due RM 23.32
=================================
Balance RM 26.68
RM 50 . . . 0
RM 10 . . . 2
RM 5 . . . 1
RM 1 . . . 1
50 sen. . . 1
20 sen. . . 0
10 sen. . . 1
5 sen. . . 1
1 sen. . . 3
writeToFile()
write the details provided by the showBalance() function to a file called pizza.dat
Topic archived. No new replies allowed.