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

SOFTWARE

e-com sem-3

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

Unit-1 Foundations of Software Systems and Blockchain

unit-1 E- Commerce

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

e com partical

Unit-II: HTML Coding Standards & Elements

Unit-V: Image Manipulations, Audio and Video & Introduction to JavaScript

Unit-III: Cascading Style Sheets (CSS) - HTML