Need Help with Exercise in C# Console Application

A community college requires students to finish at least 72 credit hours and have a GPA of 2.0 or above in order to graduate. Create a C# console application to do the following. Ask how many credit hours a student has finished and what GPA this student has. Use only one if…else statement to decide and display whether this student can graduate or not. I believe I am missing something in regards to the 'gradePointAverage' integer. I am looking for it to accept the user's input of their GPA in the format of 'x.x' . When I input a non-decimal it works but it doesn't when I put in a decimal format. I tried creating a string or decimal but I have no clue right now. Advice and guidance will be very appreciated.

I would suggest that instead of going through the expense of an extra conversion, just keep gradePointAverage as a double. This will also be more accurate, since, with your code, a GPA of 2.1 will fail, because it will be converted to 2. The conditional will stll work, but you might need to keep the value at 2.0, which is closer to what your assignment asks for.