c-record - 3) if else.... ladder

 #include<stdio.h>

#include<conio.h> 

void main()

{    

int x;

char n[10];

clrscr();

printf("\nenter the Name : ");

scanf("%s",&n);

printf("\nenter the marks: ");

scanf("%d",&x);

{

if (x>80 && x <= 100)

printf("\nGrade is A"); 

} else 

if (x>60 && x <= 80) 

printf("\nGrade is B"); 

} else

if (x>40 && x <= 60) 

printf("\nGrade is C"); 

} else 

{

printf("\n--Fail--");

}

}    

getch();  

}    


note:- write three outputs

1) output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile


2) output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile


3) output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile



Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

DBMS Degree Lab Records

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

6)what are the various service of internet and protocols ICT-unit-1