Welcome to Dream.In.Code
Become a C++ Expert!

Join 150,237 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,320 people online right now. Registration is fast and FREE... Join Now!




Student Result Sheet With Grade

 
Reply to this topicStart new topic

Student Result Sheet With Grade, Calculation of obtained marks, percentage and also grade.

salman
21 Nov, 2007 - 12:30 AM
Post #1

New D.I.C Head
*

Joined: 21 Nov, 2007
Posts: 19


My Contributions
CODE

#include <stdio.h>
#include <conio.h>
void main ()
{
    int rno, eng, urdu, pakst, stats, acc, com, bank, om;
    float per;
    clrscr ();
    printf ("\t\t\t\t* Result Sheet *");
    printf ("\n\n\n\n\tEnter Student Roll No. ");
    scanf ("%d", &rno);
    printf ("\n\n\tEnter English Marks: ");
    scanf ("%d", &eng);
    printf ("\n\n\tEnter Urdu Marks: ");
    scanf ("%d", &urdu);
    printf ("\n\n\tEnter Pakistan Studies: ");
    scanf ("%d", &pakst);
    printf ("\n\n\tEnter Statistics Marks: ");
    scanf ("%d", &stats);
    printf ("\n\n\tEnter Accouting Marks: ");
    scanf ("%d", &acc);
    printf ("\n\n\tEnter Commercial Geography Marks: ");
    scanf ("%d", &com);
    printf ("\n\n\tEnter Banking Marks: ");
    scanf ("%d", &bank);
    om = eng + urdu + pakst + stats + acc + com + bank;
    per = (float) om / 550 * 100;
    printf ("\n\n\tObtained Marks = %d", om);
    printf ("\n\n\n\tPercentage = %.2f %", per);
        if (per >= 80)
        printf("\n\n\n\tGrade = A+");
    else if (per >= 70)
        printf("\n\n\n\tGrade = A");
    else if (per >= 60)
        printf("\n\n\n\tGrade = B");
    else if (per >= 50)
        printf("\n\n\n\tGrade = C");
    else if (per >= 40)
        printf("\n\n\n\tGrade = D");
    else
        printf("\n\n\n\tGrade = FAIL");
    getch ();
}


User is offlineProfile CardPM
+Quote Post

Zumiic
RE: Student Result Sheet With Grade
21 Nov, 2007 - 03:47 AM
Post #2

New D.I.C Head
*

Joined: 20 Nov, 2007
Posts: 13


My Contributions
and?
Whats the problem?

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 1/9/09 06:13AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month