Monday, 25 January 2016

  
Another example of if condition 
Suppose if any one get 33 or greater than that then it will be treated as pass marks otherwise fail. Now, write a program that will get a number from key board and store it to a variable then justify that mark for fail or pass.
    #include<stdio.h>
    #include<conio.h>
    main(){
     int number;
     printf("\nGive a value = ");
     scanf("%d",&number);
     if(india >= 33 && india <= 100){
       printf("\n%d is pass mark",number);
     }
     else
     {
       printf("\n%d is Fail Marik",number);
     }
      getch();    [it's use for hold character in computer memory] 
    

  }
Note: i am not use the getch() function to my older post please use the getch()function for see the out put of the program. other wise program run but dot show the out put in the screen.

No comments:

Post a Comment