GTU PPS Program - 9

9. Write a program to read marks of a student from keyboard whether the student is pass or fail.

#include<stdio.h>
#include<conio.h>
int main()
{
    int marks;
    printf("\nEnter your marks out of 100 : ");
    scanf("%d",&marks);
    if(marks>=33)
        printf("\nCongratulations! you passed the exam");
    else
        printf("\nSorry! you failed, keep trying");
    getch();
    return 0;
}

Sample output

Comments

YouTube

Popular posts from this blog

GTU PPS Program - 15

PPS Program - 22

JavaFX Day - 1