Problem?

Hello everyone! So I was doing this simple program for my C++ training but there seems to be a error.In the build window doesn`t show any.I will show you right away
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream.h>
using namespace std;
int main ()
{
	char Again;
	int Day;
	cout<<"The day you want is : ";
	cin>>Day;
	switch (Day)
	{
	case 1:
		{
			cout<<"The day you chose is Monday";
			break;
		}
	case 2:
		{
			cout<<"The day you chose is Tuesday";
			break;
		}
	case 3:
		{
			cout<<"The day you chose is Wednesday";
			break;
		}
	case 4:
		{
			cout<<"The day you chose is Thursday";
			break;
		}
	case 5:
		{
			cout<<"The day you chose is  Friday";
			break;
		}
	case 6:
		{
			cout<<"The day you chose is Saturday";
			break;
		}
	case 7:
		{
			cout<<"The day you chose is Sunday";
			break;
		}
	default :
		{
			cout<<"This day number does not exist";
			break;
		}
	}
	cout<<"\n";
	cout<<"Do you want to choose another day,(y,n)?";
	if (Again='y') cin>>Day;                                 //This doesn`t
	else if (Again='n') cout<<"thank you for using our program :)";//show up
	return 0;
	system ("pause");
}


So in the Build window there is no error ,but in the console when it starts the 'cout' on row 53 and I introduce 'y' or 'n' nothing happens ... just that the program ends doesn`t ask me to introduce the day number again.I really don`t know what I did wrong..Thank you for your time .
You confused = with ==.
ohh..yea...I feel like a dumbass...thank you for helping me :D.
Wait, this won't work the way you want it to! At the end, if the user selects y, you'll simply take in a number from the user, and then end the program... You need a while loop to re-run the switch case..
Topic archived. No new replies allowed.