- 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
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
C program to Find the Largest Number Among Three Numbers
This program takes the 3 numbers and finds the biggest among all. For this, we will compare the numbers with each other and find out which is the largest
Input: a=2,b=4,c=7 Output:7 Largest Number
Explanation
This program uses only if statement to find the largest number.
Example
#include <iostream> using namespace std; int main() { int a,b,c; a=2,b=4,c=7; if(a>b) { if(a>c) { printf("%d Largest Number ",a); } else { printf("%d Largest Number ",c); } } else { if(b>c) { printf("%d Largest Number ",b); } else { printf("%d Largest Number ",c); } } return 0; }
- Related Articles
- C++ Program to Find Largest Number Among Three Numbers
- Java program to Largest number among three numbers
- Java Program to Find the Largest Among Three Numbers
- Swift Program to Find the Largest Among Three Numbers
- Haskell program to find the largest among three numbers
- Kotlin Program to Find the Largest Among Three Numbers
- How to Find the Largest Among Three Numbers in the Golang program?
- How to Find the Largest Among Three Numbers using Python?
- Program to find largest of three numbers - JavaScript
- C++ program to find the smallest element among three elements
- Java program to find largest of the three numbers using ternary operators
- Largest N digit number divisible by given three numbers in C++
- C# program to find the maximum of three numbers
- Program to find the Largest Number using Ternary Operator in C++
- Program to find the common ratio of three numbers in C++

Advertisements