#include
using std::cout; //this states that your using it so theres nomore (std::cout) just (cout)
using std::cin; // same as above but for cin
int main()
{
int grade;
cout << " Enter a grade ";
cin >> grade;
if (grade>=90)
cout << "The grade is a A";
if(grade>=80)
cout << "The grade is a B";
if(grade>=70)
cout << "The grade is a C";
system("pause");
return 0;
}
// This is a simple example of if (we will be getting more into the IF later)
-here are some things you need to know
sign meaning
> greater than
< lesser than
>= greater than or equal to
< = lesser than or equal to
== equal to
!= not equal
No comments:
Post a Comment