Large Number Program in C language


Large Number Program Description:

This is the program to check the Largest of Two Numbers ( Large Number Program) in the C programming language.

The program will ask for two numbers and display the largest of two.

Expected Output:

Example 1:



Example 2:




It is recommended to have the basic Idea about the decision-making statement (like an if-else statement) and the Relational operators in the C language.

You can check the following article to get the desired understanding of the above topics

Large Number Program Explanation:

  • At the start, Program will prompt the user for Input, and the User needs to enter two numbers
  • We are storing the number is num1 and num2 variables
  • Then we are using the if else statement to check whether the num1> num2. If it returns true, Then the num1 is larger than the num2. So we are displaying the num1 as the Large Number
  • If the above condition is not true, Then the next condition will be evaluated num1 < num2, If it returns true, Then the num2 is larger than the num1. So We are printing the num2 as Large Number onto the console.
  • If the above two conditions returns false, Then the num1 and num2 should be equal to each other. So we are displaying the equal message onto the console.

Large Number Program in C Language:

Program Output:

We are using the GCC compiler to compile and run the program. Learn about compiling and running programs in Linux at the following article

Related Programs:

Pattern and Pyramids programs in C:

C Language Tutorials Index:


Hi Guys, I am Venkatesh. I am a programmer and an Open Source enthusiast. I write about programming and technology on this blog.

You may also like...

3 Responses

  1. […] C Program to Print the Larger Number of Two Numbers […]

  2. […] have looked at the Program to find the Maximum of two numbers using the if else statement and conditional statements. In today’s article, We are going to write a C Program to find the […]

  3. […] C Program to Print the Larger Number of Two Numbers […]

Leave a Reply