1.

Write a program to print your five subjects name in the same line​

Answer»

tion:include int main(){float ENG, PHY, chem, math, comp; float total, average, percentage;* Input marks of all FIVE subjects */ PRINTF("Enter marks of five subjects: \n"); scanf("%f%f%f%f%f", &eng, &phy, &chem, &math, &comp);/* Calculate total, average and percentage */ total = eng + phy + chem + math + comp; average = total / 5.0; percentage = (total / 500.0) * 100;/* Print all RESULTS */ printf("Total marks = %.2f\n", total); printf("Average marks = %.2f\n", average); printf("Percentage = %.2f", percentage);return 0;}output➡➡Enter marks of five subjects: 95 76 85 90 89 Total marks = 435.00 Average marks = 87.00 Percentage = 87.00



Discussion

No Comment Found