Coder Social home page Coder Social logo

basic-c-programs's Introduction

Basic C Programs ๐Ÿ“Š

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.

How to Use ๐Ÿ“”

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.

Contributions ๐Ÿ’Œ

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!");๐Ÿ’ป

Program List ๐Ÿ“‘

Simple Programs

  1. Hello World in C: A classic program that prints "Hello, World!" to the console. ๐Ÿ”—

  2. Hello World in C++: The C++ version of the "Hello, World!" program. ๐Ÿ”—

  3. Addition of Two Integer Numbers: Calculate and display the sum of two integer numbers. ๐Ÿ”—

  4. Addition of Two Float Numbers: Find and display the sum of two floating-point numbers. ๐Ÿ”—

  5. Average of Two Numbers: Calculate and display the average of two numbers. ๐Ÿ”—

  6. Average of Marks in Five Subjects: Calculate the average score of marks obtained in five subjects. ๐Ÿ”—

  7. 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.
  8. Temperature Conversion: ๐Ÿ”—

    • a) Celsius to Fahrenheit: Convert a temperature from Celsius to Fahrenheit.
    • b) Fahrenheit to Celsius: Convert a temperature from Fahrenheit to Celsius.
  9. Area of a Circle: Calculate and display the area of a circle given its radius. ๐Ÿ”—

  10. Reverse of a Five-Digit Number: Find and display the reverse of a five-digit number. ๐Ÿ”—

  11. Sum of Digits in a Five-Digit Number: Calculate the sum of all the digits in a five-digit number. ๐Ÿ”—

If-Else

  1. Find the Maximum Age of Two Students: Calculate the maximum age between two students. ๐Ÿ”—

  2. Largest Among Three Numbers: Find the largest number among three input numbers. ๐Ÿ”—

  3. Check Negative or Positive: Determine whether a number is negative or positive and display the result. ๐Ÿ”—

  4. Check Even or Odd: Determine whether a number is even or odd and display the result. ๐Ÿ”—

  5. Check Leap Year: Determine whether a given year is a leap year or not and display the result. ๐Ÿ”—

  6. Check Vowel or Consonant: Determine whether a character is a vowel or consonant. ๐Ÿ”—

  7. Find the Largest Number Among Two Numbers: Find the largest number between two input numbers. ๐Ÿ”—

Switch-Case

  1. Simple Arithmetic Operations: Perform basic arithmetic operations (+, -, *, /, %) on two numbers. ๐Ÿ”—

  2. Check Vowel or Consonant (again): Determine whether a character is a vowel or consonant. ๐Ÿ”—

  3. Day of the Week: Display the day of the week based on user input. ๐Ÿ”—

Loops ( for, while, do-while)

  1. "Hello World" Five Times: Print the "Hello, World!" message five times. ๐Ÿ”—

  2. Natural Numbers: Print natural numbers from 1 to 10. ๐Ÿ”—

  3. Natural Numbers in Reverse Order: Print natural numbers in reverse order from 10 to 1. ๐Ÿ”—

  4. Factorial Using While Loop: Calculate the factorial of a number using a while loop. ๐Ÿ”—

  5. Fibonacci Series: Print the Fibonacci series until a given number of terms. ๐Ÿ”—

  6. Sum of n Natural Numbers: Calculate the sum of 'n' natural numbers, where 'n' is entered by the user. ๐Ÿ”—

basic-c-programs's People

Contributors

anuplayz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.