#include<iostream.h>
#include<conio.h>
void add(){
clrscr();
int a,b,c;
cout<<"Enter number:"<<endl;
cin>>a;
cout<<"Enter number:"<<endl;
cin>>b;
c=a+b;
cout<<"The total is: "<<c<<endl;
getch();
clrscr();
}
void sub(){
clrscr();
int a,b,c;
cout<<"Enter number:"<<endl;
cin>>a;
cout<<"Enter number:"<<endl;
cin>>b;
c=a-b;
cout<<"The total is: "<<c<<endl;
getch();
clrscr();
}
void mul(){
clrscr();
int a,b,c;
cout<<"Enter number:"<<endl;
cin>>a;
cout<<"Enter number:"<<endl;
cin>>b;
c=a*b;
cout<<"The total is: "<<c<<endl;
getch();
clrscr();
}
void div(){
clrscr();
float a,b,c;
cout<<"Enter number:"<<endl;
cin>>a;
cout<<"Enter number:"<<endl;
cin>>b;
c=a/b;
cout<<"The total is: "<<c<<endl;
if(b>a){
c=b/a;
cout<<"The total is: "<<c<<endl;
getch();
clrscr();
}
main(){
clrscr();
char choice;
do{
cout<<"~MENU~";
cout<<"[a] Addition"<<endl;
cout<<"[b] Subtraction"<<endl;
cout<<"[c] Multiplication"<<endl;
cout<<"[d] Division"<<endl;
cout<<"[e] Exit~"<<endl;
cin>>choice;
switch(choice){
case'a':
add();
break;
case'b':
sub();
break;
case'c':
mul();
break;
case'd':
div();
break;
default:
cout<<"Try Again!"<<endl<<endl;
}}while(choice!='e');
cout<<"Thank You!";
getch()
return 0;
}
it says that 'main' got no protocol... please help about this... T_T