- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Environmental Science
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find gretest in 3 number using C Programming
C Program to find greatest in 3 numbers
#include <stdio.h>
int main() {
int a, b, c;
printf("\nEnter value of a, b & c : ");
scanf("%d %d %d", &a, &b, &c);
if ((a > b) && (a > c))
printf("\na is greatest");
if ((b > c) && (b > a))
printf("\nb is greatest");
if ((c > a) && (c > b))
printf("\nc is greatest");
return(0);
}
Output :
Enter value for a,b & c : 15 17 21
c is greatest
- Related Questions & Answers
- Write C Program to Find Smallest Element in Array in C Programming
- Write a C program using pointers to read in an array of integers and print its elements in reverse order.
- Write C Program to Reversing an Array Elements in C Programming
- Write C Program to Delete duplicate elements from an array
- How to Calculate Area of Equilatral Triangle using C Language
- How to Implement Stack Operations Using Array using C
- Find Second largest element in an array using C Programming
- How to reverse a given number using C
- Recursive program to linearly search an element in a given array using C
- How to Calculate Area of Rectangle using C Program
- Write C Program to Find Factorial of Number Using Recursion
- Write C Program to Calculate Addition of All Elements in Array
- How to calculate sum of 5 subjects and find percentage Using C Program
- How to Solve Second Order Quadratic Equation Using C Program
- How to Find Area of Scalene Triangle using C
- How to print hello world using C Language
Advertisements
ads