The program ask for your name and the number of semesters for which the report is to be generated. Then it asks for the CGPA of all the semester one by one.
The Percentage is calculated as:
if CGPA < 7:
Percentage = CGPA * 7.2 + 12
else if CGPA >= 7:
Percentage = CGPA * 7.2 + 12
Check out the sample report to get more clarity.