Monday, 3 October 2011

03-10-2011 Example of Usage of if else

/*This program takes marks of student and shows either he is pass or fail*/
#include<stdio.h>
#include<conio.h>
main()
{
      int numbers = 0;
      printf("Please enter marks: ");
      scanf("%d", &numbers);
      if (numbers >= 60)
         {
         printf("Pass");
         }
      else
          {
          printf("Fail");
          }
      getche();
      return 0;

}
    



No comments:

Post a Comment