Programming Shortcut - c, c++, java, SQL, online tutorials
No Result
View All Result
  • Home
  • About us
  • Programs in c
  • Programs in cpp
  • Programs in java
  • .Net
  • Privacy Policy
  • Contact Us
  • Home
  • About us
  • Programs in c
  • Programs in cpp
  • Programs in java
  • .Net
  • Privacy Policy
  • Contact Us
No Result
View All Result
Programming Shortcut - c, c++, java, SQL, online tutorials
No Result
View All Result
Home Programming Language

Program to find out the grade and percentage calculator in c

Program to find out the grade and percentage calculator in c of a student when the marks of 6 subjects are given

admin by admin
March 6, 2022
Reading Time:2min read
0
Program to find out the grade and percentage calculator in c

Program to find out the grade and percentage calculator in c

In this program, we calculate the grade and percentage of a student according to 6 subjects marks by the given below methods by if-else loop concepts basic to advance loop in c

The method of assigning grades is –
percentage>=85 grade=A
percentage<85 and percentage>=70 grade=B
percentage<70 and percentage>=55 grade=C
percentage<55 and percentage>=40 grade=D
percentage<40 grade=E

RELATED POSTS

Armstrong number in c

Program to find out code of grade and percentage calculator in Java

Program to find out the grade and percentage calculator in cpp

#include<stdio.h>
#include<conio.h>
void main()
{
float m1,m2,m3,m4,m5,m6,total,per;
//Makeing all marks Float type variables
char grade;
//Makeing a char type for grade
printf(“Please enter S1 marks of Subject 1 :\t “);
scanf(“\t%f\t”,&m1);
printf(“Please enter S1 marks of Subject 2 :\t “);
scanf(“\t%f\t”,&m2);
printf(“Please enter S1 marks of Subject 3 :\t “);
scanf(“\t%f\t”,&m3);
printf(“Please enter S1 marks of Subject 4 :\t “);
scanf(“\t%f\t”,&m4);
printf(“Please enter S1 marks of Subject 5 :\t”);
scanf(“\t%f\t”,&m5);
printf(“Please enter S1 marks of Subject 6 :\t “);
scanf(“\t%f\t”,&m6);
printf(“\n”);
//Calculate the percentage of all Marks
total=m1+m2+m3+m4+m5+m6;
per=total/6;
//Condtion Check for to find the grade of
if(per>33){
if(per>=85){
grade=’A’;
}
else if(per>=70){
grade=’B’;
}
else if(per>=55){
grade=’C’;
}
else if(per>=40){
grade=’D’;
}
else {grade=’E’;
}
printf(“Student S1 passed with %c Grade with %.ff\n”,grade,per);
}
else{
printf(“Students S1 is Fail in the Examnation”);
}
getch();
}

Suppose Student S1 find the following marks
Subject 1=81, Subject 2 =83, Subject 3 = 78, Subject 4 = 90, Subject 5 = 68, Subject 6 = 87,

Output:
Please enter S1 marks of Subject 1: 81
Please enter S1 marks of Subject 2: 83
Please enter S1 marks of Subject 3: 78
Please enter S1 marks of Subject 4: 90
Please enter S1 marks of Subject 5: 68
Please enter S1 marks of Subject 6: 87Student S1 passed with B Grade with 78.500000Process returned 1 (0x1) execution time : 25.400 s
Press any key to continue.

I make this programming and hope you are like the post if are you like the post you can please comment and share the post to reach more people.
If any doubt about this c programming code or input & output please comment below
If you have another question about c programming send an email by contacting programmingshortcut@gmail.com us form is given on the page right side.

Share your experience about this post,
Thank You!

Tags: c language basicsc programif-else loopprogram example
ShareTweetPin
admin

admin

Related Posts

Programming Language

Armstrong number in c

November 12, 2022
Program to find out code of grade and percentage calculator in Java
Programming Language

Program to find out code of grade and percentage calculator in Java

April 5, 2022
Program to find out the grade and percentage calculator in cpp
Programming Language

Program to find out the grade and percentage calculator in cpp

March 7, 2022
Programs in c

how to find quotient and remainder in c program

April 21, 2020
Programming Language

Difference and similarities between java and c++

April 3, 2022
.Net

Difference between FOPs and OOPs

April 16, 2020
Next Post
Program to find out the grade and percentage calculator in cpp

Program to find out the grade and percentage calculator in cpp

Program to find out code of grade and percentage calculator in Java

Program to find out code of grade and percentage calculator in Java

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Popular Stories

  • Short name by java program

    0 shares
    Share 0 Tweet 0
  • Relation of two numbers in c programming

    0 shares
    Share 0 Tweet 0
  • Bigger and smaller number in c programming

    0 shares
    Share 0 Tweet 0
  • Bigger and smaller number in c++

    0 shares
    Share 0 Tweet 0
  • Java program to perform sum of digits until single digit is obtained

    0 shares
    Share 0 Tweet 0
ADVERTISEMENT
C, C++ & Java Programming tutorial with example Programming Shortcut

Hi Friends, Programming Shortcut is Educational Blog, that From you Learn Programming in Multiple languages like C, C++, Java Programming Language.

LEARN MORE »

Recent Posts

  • Armstrong number in c
  • Program to find out code of grade and percentage calculator in Java
  • Program to find out the grade and percentage calculator in cpp

Categories

  • .Net
  • Programming Language
  • Programs in c
  • Programs in cpp
  • Programs in java
  • Uncategorized

All © 2021 Programming Shortcut - Present By Math Training.

No Result
View All Result
  • Home
  • About us
  • Programs in c
  • Programs in cpp
  • Programs in java
  • .Net
  • Privacy Policy
  • Contact Us

All © 2021 Programming Shortcut - Present By Math Training.

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.