Welcome to the Basic C Programs repository! This repository contains simple C and C++ programs that are great for beginners who are learning programming. These programs cover various fundamental concepts in programming and can serve as a starting point for your coding journey.
You can clone this repository and compile/run these programs on your local machine. Each program is located in its own directory and includes source code and instructions on how to compile and execute it.
Feel free to explore the programs, modify them, or use them as a reference to learn more about C and C++ programming.
If you have any additional C or C++ programs you'd like to contribute to this repository, please feel free to create a pull request. Contributions and improvements are always welcome!
printf("Happy coding!");
๐ป
-
Hello World in C: A classic program that prints "Hello, World!" to the console. ๐
-
Hello World in C++: The C++ version of the "Hello, World!" program. ๐
-
Addition of Two Integer Numbers: Calculate and display the sum of two integer numbers. ๐
-
Addition of Two Float Numbers: Find and display the sum of two floating-point numbers. ๐
-
Average of Two Numbers: Calculate and display the average of two numbers. ๐
-
Average of Marks in Five Subjects: Calculate the average score of marks obtained in five subjects. ๐
-
Variable Value Exchange: ๐
- a) Using a Third Variable: Swap the values of two variables using a third variable.
- b) Without Using a Third Variable: Swap the values of two variables without using a third variable.
-
Temperature Conversion: ๐
- a) Celsius to Fahrenheit: Convert a temperature from Celsius to Fahrenheit.
- b) Fahrenheit to Celsius: Convert a temperature from Fahrenheit to Celsius.
-
Area of a Circle: Calculate and display the area of a circle given its radius. ๐
-
Reverse of a Five-Digit Number: Find and display the reverse of a five-digit number. ๐
-
Sum of Digits in a Five-Digit Number: Calculate the sum of all the digits in a five-digit number. ๐
-
Find the Maximum Age of Two Students: Calculate the maximum age between two students. ๐
-
Largest Among Three Numbers: Find the largest number among three input numbers. ๐
-
Check Negative or Positive: Determine whether a number is negative or positive and display the result. ๐
-
Check Even or Odd: Determine whether a number is even or odd and display the result. ๐
-
Check Leap Year: Determine whether a given year is a leap year or not and display the result. ๐
-
Check Vowel or Consonant: Determine whether a character is a vowel or consonant. ๐
-
Find the Largest Number Among Two Numbers: Find the largest number between two input numbers. ๐
-
Simple Arithmetic Operations: Perform basic arithmetic operations (+, -, *, /, %) on two numbers. ๐
-
Check Vowel or Consonant (again): Determine whether a character is a vowel or consonant. ๐
-
Day of the Week: Display the day of the week based on user input. ๐
-
"Hello World" Five Times: Print the "Hello, World!" message five times. ๐
-
Natural Numbers: Print natural numbers from 1 to 10. ๐
-
Natural Numbers in Reverse Order: Print natural numbers in reverse order from 10 to 1. ๐
-
Factorial Using While Loop: Calculate the factorial of a number using a while loop. ๐
-
Fibonacci Series: Print the Fibonacci series until a given number of terms. ๐
-
Sum of n Natural Numbers: Calculate the sum of 'n' natural numbers, where 'n' is entered by the user. ๐