error c2447

I run this program and get several errors, could someone tell me what the problem is.
Error line 21 error C2143: syntax error : missing ';' before 'switch;
Error line 23 error C2447: missing function header (old-style formal list?)
Error line 65 error C2447: missing function header (old-style formal list?)

//Inputs Output
// A B X
// 0 0 0
// 0 1 0
// 1 0 0
// 1 1 1

//Expected output
//Inputs 1 Input 0 Expected Actual
//0 0 0
//0 1 0
//1 0 0
//1 1 1
//
//Source code
#include <iostream>


int main(void);

switch (x<=5);// input 1

{

A=(x<=5)&&(y=6);// output

int
Monday=1
Tuesday=2
Wednesday=3
Thursday=3
Friday=5
Saturday=6
Sunday=7
x=0
y=0
A=0
;
cout<<"Enter a number between 1 and 7:"x;
cin>> x;
cout:end1

case 1:

case 2:

case 3:

case 4:

case 5:
cout<< " Alarm on input 1";
break;
default:

case 6:
cout<< "Sleep in" << end1;
break;
case 7:
cout<< "Sleep in" << end1;


}

{

switch (Y=6);//input 0

int ;

cout<<"Enter a number for number time:"y;
cin>> y;
cout<<end1;
case 1:
cout<< " Alarm on input 0";

break;

default:

case 2:
cout<< "Sleep in"
cout<< A;// output
cout<<end1;

return 0;
}
closed account (z05DSL3A)
I don't want to be harsh but seriously, start over.

C++ Language Tutorial
http://www.cplusplus.com/doc/tutorial/
what, that is all you got to offer for some advice, I am trying ask for some help and that is all you have to say, wow. Seriously, I guess you are not a good tutor.
You have a lot of errors there. Far too many for Grey Wolf or any other veteran member to avoid giving a link to the tutorials. You start off with 3 errors, but after correcting those, you get many more. For example, you aren't using namespace std, yet you still call cout and cin without the std:: prefix. That alone should generate at least 12 errors (excluding your use of cout:endl).

In some cases, like this, it's best to clear the board and start again. Read the tutorial carefully, and start again. After you learn what you can and need to learn, rewrite your code, post it here, and we'll try to help you with the finer details again.

And... before you ask... we aren't going to solve this for you. We're here to help with the development of others' skills, not to just write code and not care about what happens to it.

Think of this as tough love.

-Albatross

I agree with him. This code you have here shows that the way you've understood major parts of the language is completely wrong. Read the link he posted.

By the way, it's "endl" (lower case L after "end"), not "end1" (numeral 1 after "end"). It means "end line".
I think there is no line besides "return 0;" that does not contain an error.
When you start your book over, try every concept you read about in a small program of your own to familiarize yourself with the C++ syntax.
closed account (z05DSL3A)
making,

As I said I do not want to be harsh. It is not my intension to belittle you or to try to put you off learning to program.

You guess I'm not a good tutor, you are probably correct. I try to find the root cause of peoples problem and guide them to a solution. Your script showed a lack of knowledge of even the basic structure of the code, you have to get this down before you can move on. The tutorials here are very good and the member of this forum will help (and that is not always just fixing your code).

I'm sorry if you have taken my post the wrong way.

GW
Topic archived. No new replies allowed.