- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- 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 smallest element among three elements

In this tutorial, we will be discussing a program to find the smallest element among the provided three elements.

We will be provided with three elements/ integers and our task is to compare them and find the smallest element/ integer among them.

## Example

#include <bits/stdc++.h> using namespace std; int main() { int a = 45, b = 72, c = 10; if (a <= b && a <= c) cout << a << " is smallest" << endl; else if (b <= a && b <= c) cout << b << " is smallest" << endl; else cout << c << " is smallest" << endl; return 0; }

## Output

10 is smallest

- Related Questions & Answers
- Java Program to Find the Largest Among Three Numbers
- C program to Find the Largest Number Among Three Numbers
- C++ Program to Find Largest Number Among Three Numbers
- How to Find the Largest Among Three Numbers using Python?
- Java program to Largest number among three numbers
- Java program to find smallest of the three numbers using ternary operators
- C# Program to find the smallest element from an array
- C# program to find common elements in three sorted arrays
- Python program to find common elements in three sorted arrays?
- Java program to find common elements in three sorted arrays
- 8085 Program to find the smallest number
- C# Program to find the smallest element from an array using Lambda Expressions
- C++ Program to find kth Smallest Element by the Method of Partitioning the Array
- Python Program To Find the Smallest and Largest Elements in the Binary Search Tree
- Program to find kth smallest element in linear time in Python

Advertisements