Write a program to calculate CGPA of a student. The program should be able to get input from the user of the Mark for each course. Please see the Attached File
.. i don't know c(?) syntax put some printf statements in there to see what is happening
Actually, You Are Not Using The Conditions In The if Statement...!! It Should Be Like This: if (a >= 90 && a <= 100) { e = 4; } else if ( a >= 80 && a <= 89) { e = 3; } and so on...!! Actually, When You Use This: if (90 <= a <=100) { a = 4; } So, When You Enter 66 Then 90 Is Compared With The Value Of a i.e., 90 <= 60 Is False, But 100 Is Compared With What Value...!! If You Think That (90 <= a >=100) Means That a Is Less Then Or Equal To 90 And a Is Greater Then Or Equal To 100, Then This Is True When You Are Write These Kind Of Expressions In Mathematics, But In C As Long As I Know, This Is Not A Replacement Of This Statement...!! The Correct Replacement Of (90 <= a >=100) Is (a >= 90 && a <= 100) In C...!! I Hope This Will Help You...!!
its now ok, thak you
Thank You very much
You Are Welcome....!!
Join our real-time social learning platform and learn together with your friends!