+ 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);

14th Feb 2018, 5:00 PM
gautam
gautam - avatar
1 Answer
0
Your complete code is not visible. Please upload it again.
15th Feb 2018, 9:30 AM
Shivangi Agarwal
Shivangi Agarwal - avatar