Print a student's grade by accepting percent marks.

This post content:-

  • Algorithm
  • Flowchart
  • C code
  • Output
  • PDF notes

Algorithm:-

Step 1:- start.

Step 2:- declare variable num.

Step 3:- take input of marks as num.

Step 4:- print grade by using else if statement. As follow:-

    if(num >= 80){

    printf(" You got A grade"); 

        }

    else if ( num >=60)

       { 

        printf(" You got B grade");

        }

    else if ( num >=40){

        printf(" You got C grade");

        }

    else if ( num < 40){

        printf(" You Failed in this exam");

        }

Step 5:- END.


Flowchart:-


C code:-


output:-


Try it yourself:-

Online c compiler

Download pdf notes

Comments

Popular posts from this blog

Develop and execute C Program to Add Two Distances given in kilometer-meter Using Structures.

Develop a c program to find the sum of all elements stored in a given array using a pointer.