Skip to main content

NESTED IF ELSE

Nested If Else
#include < stdio.h >
void main()
{
  int marks;
  printf("Enter your marks : ");
  scanf("%d",&marks);
  if(marks>100)
/*marks greater than 100*/
    printf("Not valid marks");
  else if(marks>=80)
/*marks between 80 & 99*/
    printf("your grade is A");
  else if(marks >=70)
/*marks between 70 & 79*/
    printf("your grade is B");
  else if(marks>=50)
/*marks between 50 & 69*/
    printf("your grade is C");
  else if(marks>=35)
/*marks between 35 & 49*/
    printf("your grade is D");
  else
/*marks less than 35*/
    printf("your grade is E");
}

Comments

Popular posts from this blog

Software

Software The ingredients that enables a computer to perform a specific task is software, Which consist​ of instructions.A set of instructions that drive a computer to perform specific task is called program.These instructions tell the machine physical components what to do,without the instruction a computer couldn't do anything at all.Software that are classified into two category 1.System software 2.Application software

REVERSE NUMBER USING ARRAY

Reverse number using array #include < stdio.h > void main() { int n, array[100], i; printf("Enter no of digits in your number"); scanf("%d",&n); printf("Enter no.") for(i=0,i < n;i++) scanf("%d",&a[i]); /*storing each no in array*/ printf("Reverse no is : "); for(i=n-1,i > =0;i--) printf("%d",a[i]); /*Printing array in reverse order*/ }

Application Software

Application Software tells the computer how to accomplish a specific task such as word-processing or Drawing for the user.Thousands of application are available for many purposes and the some of the major categories are 1.Word-processing Software For creating text based document example MS word 2. Spreadsheet Software For creating numeric based document such as balance sheet example MS Excel 3.Database Management Software For building and manipulating large set of data such as the names, Address and phone numbers in telephone directory Example MS Access 4.Presentation Software For creating and presenting slideshows example MS Power Point 5.Graphics Programs for designing and manipulating photograph for animation 6.Multimedia Application For building digital movie that incorporate sound,video, Animation and interactive features Example windows movie Maker 7.Entertainment and education software . Example any games 8.Web Design tool and web browser and other internet appl...