C Program to Find Biggest of Two Numbers using Graphics
#include<stdio.h> #include<conio.h> #include<graphics.h> main() { int a, b; clrscr(); textmode(C80); textbackground(RED); textcolor(GREEN); gotoxy(20,10); cputs("Enter the first number:"); scanf("%d", &a); gotoxy(20,12); cputs("Enter the second number:"); scanf("%d", &b); textcolor(BLUE+BLINK); if(a>b) { gotoxy(20, 15); printf("%d",a); cputs(" is the biggest number"); } else { gotoxy(20, 15); printf("%d",b); cputs(" is the biggest number"); } getch(); restorecrtmode(); }
Output: