In: Computer Science
A student is ready to graduate if his GPA is at least 2.0 and he is in his fourth year. Write a C++ program that will ask the student about his GPA and what year he is currently in. The program should display a message saying either the student is ready to graduate or he still needs more schooling. This program must be in C++ and must be able to run.
Thank you and I hope you have a great day!
Here is your code...
#include<iostream>
#include<string>
using namespace std;
int main()
{
   float GPA;
   string year;
   cout<<"Please enter your GPA : ";
   cin>>GPA;
   cout<<"Please enter the year you are currently
in : ";
   cin>>year;
   if(GPA>=2.0 && year=="fourth")
   {
       cout<<"You are ready to
graduate.";
   }
   else
   {
       cout<<"You still need
schooling.";
   }
   return 0;
}


