Saturday, March 23, 2013

Marksheet - C Language

TASK:
Write a program that takes input of five subjects' marks and calculate percentage of students.

INPUT:
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
float a,b,c,d,e,f,g;
printf("                                               Marksheet");
printf("\n\nEnter the marks for English:");
scanf("%f",&a);
printf("Enter the marks for Mathematics:");
scanf("%f",&b);
printf("Enter the marks for Biology:");
scanf("%f",&c);
printf("Enter the marks for Physcis:");
scanf("%f",&d);
printf("Enter the marks for Chemistry:");
scanf("%f",&e);
f=a+b+c+d+e;
printf("\nTotal Marks Secured (Out of 500):%f",f);
g=f/500*100;
printf("\nTotal Percentage Secured:%f",g);
getch();
}

OUTPUT:


2 comments:

  1. brother your task is awesome and very helpful for me i am aptech student and m doing accp..

    ReplyDelete
  2. wow! Great writing. Thanks a lot for sharing this. Check my blog for black friday deals.

    ReplyDelete