error C2447: '{' : missing function header (old-style formal list?)

: error C2447:warning C4518: 'double ' : storage-class or type specifier(s) unexpected here; ignored
: error C2146: syntax error : missing ';' before identifier 'a'
: fatal error C1004: unexpected end of file found

can someone help me what is the problem with this.? plss



#include <windows.h>
#include <process.h>
#include <iostream.h>
void gotoxy(int, int); // prototype
void clrscr(); // prototype

int main ()
double a,b,c,x;
char more='y';
{
clrscr(); // fuction call
gotoxy (10,10); // function call
cout<<" [A] ADDITION";
gotoxy (15,15); // function call
cout<<" [B] SUBTRACTION";
gotoxy (20,20); // function call
cout<<" [C] MULTIPLICATION";
gotoxy (25,25); // function call
cout<<" [D] DIVISION";
gotoxy (30,30); // function call
cout<<" [E] MODULUS REMAINDER";
gotoxy (35,35); // function call
cout<<" Choose Operation ";
clrscr(); // fucntion call
cout<<"Input Operation <a-e>";
cin>> X;
clrscr();
if (X==a){
cout<<"ADDITION";
cin>> a;
cout<<"Input your number";
cin>> b;
c=a+b
cout<<"The sum is"<<c;}
clrscr();
if (x==b) {
cout<<"SUBTRACTION";
cout<<"Input your number";
cin>> a;
cout<<"Input your number";
cin>> b;
c=a-b
cout<<"The diff is"<<c;}
clrscr();
if (x==c) {
cout<<"MULTIPLICATION";
cout<<"Input your number";
cin>> a;
cout<<"Input your number";
cin>> b;
c=a*b
cout<<"The product is"<<c;}
clrscr();
if (x==d) {
cout<<"DIVISION";
cout<<"Input your number";
cin>> a;
cout<<"Input your number";
cin>> b;
c=a/b
cout<<"The qoutient is"<<c;}
clrscr();
if (x==e) {
cout<<"MODULUS REMAINDER";
cout<<"Input a number";
cin>> a;
cout<<"Input a number"
cin>> b;
c=a%b
cout<<"The modulus remainder is "<<c;}
else
cout<<"Invalid input";
while (more=='Y' || more=='y')
{/*begin while*/
cout<<"Input your number:";
cin>> a;
cout<<"Input a number:";
cin>> b;
cout<<"The sum is"<<sum<<"\n";
cout<<"Do you want to continue[y/n]";
cin>> more;
}/*end while */

return 0;
}
// function definition -- requires windows.h
void gotoxy(int x, int y)
{
HANDLE hConsoleOutput;
COORD dwCursorPosition;
cout.flush();
dwCursorPosition.X = x;
dwCursorPosition.Y = y;
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
}

// function definition -- requires process.h
void clrscr()
{
system("cls");
}


Last edited on
Remove semicolon after main()
Last edited on
thank you ...... but can u help me again ive put something in the program...
1
2
#include <iostream.h>
#include <iostream.h> 



1
2
3
4
int main ()
double a,b,c,x;//You cannot have anything between main() and '{'
char more='y';
{
Topic archived. No new replies allowed.