ຮຽນພິມຕາມນີ້ເລີຍ ຫລັງຈາກພີມແລ້ວ ຄອມພາຍແລະລັນເບິ່ງ ( ບໍ່ເຂົ້າໃຈຖາມໄດ້ ຕອນໄປ ຮຮ)
#include <stdio.h>
float g;
main ()
{printf ("\n\t\tWelcom to program GPA calculato");
printf ("\n\n\t\tPlease input your score: ");
scanf("%f", &g);
if (g>=80)
printf("\n\n\t\tExcellence Your GPA is 4.00");
else if(g>=75)
printf("\n\n\t\tExcellence Your GPA is 3.50");
else if(g>=70)
printf("\n\n\t\tGood Your GPA is 3.00");
else if(g>=65)
printf("\n\n\t\tGood Your GPA is 2.50");
else if(g>=60)
printf("\n\n\t\tYour GPA is 2.00 Try again and lpease your attention");
else if(g>=55)
printf("\n\n\t\tYour GPA is 1.00 'lpease your attention");
else if(g>=50)
printf("\n\n\t\tYour GPA is 1.00 'lpease your attention");
else
printf("\n\n\t\tSorry you are fail");
getchar();
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น