Write a program to check whether student is pass or fail

  • Post author:
  • Post published:January 25, 2023
  • Post category:blog

int main()
    printf("\n\n\t\t Check Whether student is Pass or Fail\n\n\n");

    int number;
    printf("Please enter a number:\n");
        For single statements we can skip the curly brackets
    if(number < 50)
        printf("Student is Fail!\n");
    else if(number == 50)
        printf("Student is Pass!\n");
        printf("Student is Pass!\n");

    printf("\n\n\t\t\t Try it urself !\n\n\n");

    return 0;