Take input as char

So I am trying to write a program that determains if a student has passed a class or not. I have to have the user input exam marks, course work marks, whether they have withdrawn from the class or if they are exempt from the class. The withdrawn and exempt parts are meant to be taken in as a char, but I am not sure how to do that part. So this is the code i have so far

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
  #include <iostream>
using namespace std;

int main()
{

	int ExamMark;
	int CourseMark;
	char withdrawn;
	char exempt;



	cout << "Please enter Exam mark and course work mark " << endl;
	cin >> ExamMark >> CourseMark >> withdrawn >> exempt; 
	
	if ((ExamMark > 40 && CourseMark > 40 ) && (!withdrawn==y || exempt==y ))
		cout << "You have passed" << endl;

	else
		cout << "You failed" << endl;


	system("pause");
		return 0;

}



Can anyone help with how i get the char part to work with the withdrawn and exempt part
closed account (48T7M4Gy)
withdrawn != 'y' || exempt == 'y'
Topic archived. No new replies allowed.