Skip to content

A simple Temperature Converter program in C that converts temperatures between Celsius and Fahrenheit. It features a user-friendly interface allowing easy input and conversion. Ideal for quick temperature calculations, it demonstrates basic programming concepts and interactive user prompts. Perfect for educational purposes and practical use.

Notifications You must be signed in to change notification settings

rkstudio585/temperature-converter-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Certainly! Here's a detailed README # Temperature Converter 🌡️

In Python

Logo


Overview

This Temperature Converter program allows you to easily convert temperatures between Celsius and Fahrenheit. It's a simple and effective tool for quickly finding temperature equivalents, whether you're a student, scientist, or just curious about temperature conversions.

Features

  • Convert from Celsius to Fahrenheit 🌡️➡️🌟
  • Convert from Fahrenheit to Celsius 🌟➡️🌡️
  • User-friendly interface with clear instructions 🖥️

How It Works

  1. Start the Program: Compile and run the program using a C compiler.
  2. Choose Conversion Type: Select the type of conversion you want to perform:
    • Celsius to Fahrenheit
    • Fahrenheit to Celsius
  3. Enter Temperature: Input the temperature value you wish to convert.
  4. View Results: The program will display the converted temperature in the selected unit.

How to Use

Compilation

To compile the program, use the following command in your terminal:

git clone https://github.com/mdriyadkhan585/temperature-converter-C
cd temperature-converter-C
gcc -o temperature_converter temperature_converter.c

Running the Program

After compilation, run the program with:

./temperature_converter

Example Usage

  1. Celsius to Fahrenheit:

    • Prompt: Enter temperature in Celsius:
    • Input: 25
    • Output: 25.00 Celsius is equal to 77.00 Fahrenheit
  2. Fahrenheit to Celsius:

    • Prompt: Enter temperature in Fahrenheit:
    • Input: 77
    • Output: 77.00 Fahrenheit is equal to 25.00 Celsius

Code Explanation

  • celsiusToFahrenheit: Converts Celsius to Fahrenheit using the formula F = (C * 9/5) + 32.
  • fahrenheitToCelsius: Converts Fahrenheit to Celsius using the formula C = (F - 32) * 5/9.

Contributing

Feel free to fork the repository and contribute improvements or bug fixes. Pull requests are welcome!


About

A simple Temperature Converter program in C that converts temperatures between Celsius and Fahrenheit. It features a user-friendly interface allowing easy input and conversion. Ideal for quick temperature calculations, it demonstrates basic programming concepts and interactive user prompts. Perfect for educational purposes and practical use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages