//C Program to demonstrate conditional operator:-
#include <stdio.h>
#include<conio.h>
void main()
{
int mark;
clrscr();
printf("Enter mark: ");
scanf("%d", &mark);
printf(mark >= 35 ? "Passed" : "Failed");
getch();
}
============
Output:-
Enter mark: 89
Passed
============
Comments
Post a Comment