Thread: C++ help
View Single Post
Old January 2nd, 2006, 02:01 PM  
Skhorpion
Awesome Poster
 
Join Date: October 17, 2005
Location: Middle Tennessee
Age: 24
Gender: Male
Default C++ help

ok i was bored and decided to make a really long "Ultimate grade report" for teachers (even though teachers wont use it) and im stuck

i want them to be able to type Y or N to decide which things they want to see but it either doest let me type or shows it anyway, heres the part where it asks you

Code:
cout << "Phase 3\n"
	 << "Phase 3 consists of relaying you teh information\n\n\n\n" << endl;

cout << "Would you like to see the class average? Y/N\n" << endl;


if (phase3 = cin.get()) {
	
	switch (phase3) {

	case 'Y':
	case 'y':
		phase3++;
		break;

	case 'N':
	case 'n':
		break;

		if (phase3 == 0)
			break;
	}
}

cout << fixed << setprecision (2) << phase1 << "\n\n" << endl;

cout << "Would you like to see the letter grades? Y/N" << endl;
phase3 = 0;

while (phase3 == 0) {
	cin >> phase3;
	switch (phase3) {

	case 'Y':
	case 'y':
		phase3++;
		break;

	case 'N':
	case 'n':
		break;

		if (phase3 == 0)
			continue;
	}
}

cout << "\nA: " << aGrade
	 << "\nB: " << bGrade
	 << "\nC: " << cGrade
	 << "\nD: " << dGrade
	 << "\nF: " << fGrade
	 << endl;
and kiros, i know you can probably compress that into like two lines but dont, i want to try to get it myself using what i know, i just cant for the life of me get this part

All is fair in love and war.
Skhorpion is offline   Reply With Quote