Noob I/O Error

Hi, im new and i was triying to make up a basic grading program so i could use some ifs you know but im doing something wrong cuz when the user inputs the program just shuts if i dont add the System("Pause") thingy.
I hope you can help me sorry for the sloppiness.
Greeting from costa rica

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
using namespace std;
int main ()
{

int nota;
	cout << "Hello, please enter your score on Programming Class.";
	cin>> nota;
if (nota >= 65)
    if (nota <= 89)
    {
        cout << "Congrats, you've passed the course!";
    }
    else
    { if (nota < 65) {
		cout << "Sorry, you have not passed the course.";}

	}	system ("Pause");
}
Well, what appears to be happening is that if the grade is greater than 65 but less than 89, than it will say that they passed. Otherwise, if it is less than 65, it will say that they have not. If it is greater than 89, it will just shut off. The issue here isn't an input-output error, but just a small math error and logic error. I'm sure you can figure it out if you look at it a bit longer.
lol what thanks i ll give it a check thanks for your hint :)
Topic archived. No new replies allowed.