c-thumb

C Program to find Largest of 3 numbers

Let’s see how to write a simple C program to Find the Largest number among three numbers. The logic is to get 3 numbers from the user and use the If condition to print out the Largest numbers among them.

Go through the above program and read the comments to understand it. Create a new file and copy-paste the above program to execute it.

This program is useful for school/college students or those who are learning the basics of the C programming language.

From this program, you can get the knowledge of the below items:

  1. How to compare two Integers in C
  2. How to use Ternary if Condition in C (Single line If condition in C Programming)
  3. Store a value in temp variable in C

Hope this helps you!. All the best

Related Posts

Leave a Reply