+ 1
I don't why the percentage is negative.Below is the code(C)
#include <stdio.h> #include <string.h> main() { char Name[15]; float English,Maths,Science,Sst,Hindi; float percent=(Maths+Science+Hindi+Sst+English/4); printf("Welcome\n"); printf("This simple program will calculate your percentage\n"); printf("Enter the marks obtained in each subjects in numbers\n"); //program screen printf("Enter your name(only first):-\n"); strcpy(Name,""); scanf("%s",Name); //for english printf("English:"); scanf("%2f\n",&English);
1 Antwort
0
Your complete code is not visible. Please upload it again.