Please correct me i am not getting the value of z in output
#include <stdio.h> int main() { int sci,maths,comp; char name[20]; scanf("%20s",name); printf("Result of mr/mrs %s \n",name); scanf("%5d",&sci); printf("The mark of Science = %d \n",sci); scanf("%5d",&maths); printf("The mark of maths = %d \n",maths); scanf("%5d",&comp); printf("The mark of computer = %d \n",comp); int a = sci+maths+comp; if(a < 300){ int z = a/300*100; if(z >= 40) printf("He/she have passed the test with the percent of = %d",z); else printf("He/she have failed the test with the percent of = %d",z); } else if(a == 300) printf("He/she have got 100 percent in his/her test"); else printf("Marks of oone of the subject must be exceded the limit. please try it again"); return 0; }