Conditional Rendering in React Complete Guide with Examples 2026

Image
  Conditional Rendering in React Conditional Rendering is one of the most useful concepts in React. It means showing different content on the screen depending on a condition. For example: If a user is logged in → show Logout If a user is not logged in → show Login If a student has passed → show Congratulations If a product is available → show Buy Now If data is loading → show Loading... React does not have a separate if rendering tag. Instead, we use normal JavaScript conditions such as if, the ternary operator, &&, and switch to decide what should appear in the UI.

How to Calculate Grade in C Program with Marks Example

                                C Program 

How to Calculate Grade in C Program with Marks Example


c program  to find grade of a student code example  
Example :


#include<stdio.h>
#include<conio.h>
void main()
{
int marks;
clrscr();
printf("Enter Marks");
scanf("%d",&marks);

if((marks<100)&&(marks>70))
{
printf("Destinction");
}


else if((marks>60)&&(marks<69))
{
printf("First Class");
}
else if((marks>=50)&&(marks<59))
{
printf("Second Class");
}
else if((marks>=40)&&(marks<=49))
{
printf("Third Class");
}
else{
printf("Fail");
}
getch();
}



C program to find grade of a Student 
Explanation:-

  1. 100 To 70  :- destinction
  2. 60  To  69  :- First Class
  3. 50 To  59   :- Second Class
  4. 40 To  49   :- Third Class
  5. fail

C program to find grade of a Student 
Program Output :

Enter Marks :- 98
Destinction

Related Post :-

Project home page html and CSS

Comments

Popular posts from this blog

HTML Tag

CSS Text Color Explained with Syntax and HTML Examples

HTML Input Type Submit Syntax and Example