const marks=[60,80,31,58,92]
1.declare variables
let i=0;
let fail count=0
let total=0
let avg=0
2.Declare condition while(i<=4) and if(marks[i]<35)
3.post increment fail count
4.post increment i
5.Add condition to check if(fail count>0) 6.print ("NO GRADE")
7.Add while condition to find total while(i<=4) i=0 total=mark[i]+total
8.Avg= total/no of subject
9.If avg>=90 print(A) if avg>80 and avg<90 print(B) if avg>70 and avg<80 print(C) if avg>50 and avg<70 print(D) else print(E)
FLOWCHART FOR EXECUTION
CODE:



Top comments (0)