In this c programming example we will learn how to compare three integeres.
#include <stdio.h> int main() { int a, b,c; printf("Enter number a : "); scanf("%d", &a); printf("Enter number b : "); scanf("%d", &b); printf("Enter number c : "); scanf("%d", &c); if(a > b && a > c) printf("a is largest "); else if(b > a && b > c) printf("b is largest "); else if(c > a && c > b) printf("c is largest "); else printf("No largest number found") ; return 0; } |
Enter number a : 21
Enter number b : 23
Enter number c : 78
c is largest
Library Management System Project
Contact Management System Project
Cricket Score Card C Project CSMS
Medical Store Management System project with c
Personal Diary Management System project with c
School Billing Management System project with c
Student Record System project with c