0% found this document useful (0 votes)
10 views

Batch1 - CS - II-I - DATA STRUCTURES

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Batch1 - CS - II-I - DATA STRUCTURES

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

A PROJECT REPORT

ON

TEMPERATURE CONVERTER
A Course Project report Submitted in partial fulfillment of the Academic requirements for the award of
the degree of

BACHELOR OF TECHNOLOGY

IN

CSE-CYBER SECURITY

Submitted by
A. Meghana (22D41A6201)
A. Sindhu (22D41A6202)
A. Tejaswini (22D41A6203)

A. Harideep Kumar (22D41A6204)

B. Bhavya Sree (22D41A6205)

Under the esteemed guidance of


P.TULASI

DEPARTMENT OF CYBER SECURITY


SRI INDU COLLEGE OF ENGINEERING & TECHNOLOGY (Autonomous)

(Approved by AICTE, New Delhi & Permanently Affiliated to JNTU Hyderabad


Sheriguda (V), Ibrahimpatnam (M),R.R.Dist-501 510)

2023-2024
SRI INDU COLLEGE OF ENGINEERING & TECHNOLOGY
(An Autonomous Institute)

(Approved by AICTE, New Delhi & Permanently Affiliated to JNTU Hyderabad)

DEPARTMENT OF CYBSECURITY

CERTIFICATE

This is to certify that the Project entitled “TEMPERATURE CONVERTER” is submitted in partial fulfilment
for the award of Degree of Bachelors of Technology in Cyber Security of Sri Indu College of Engineering And
Technology, Hyderabad for the academic year 2023-2024. This is a record of the project work done by

A.Meghana(21D41A6201), A.Sindhu(22D41A6202),A.Tejaswini(22D41A6203),

A.Harideep Kumar(22D41A6201),B.Bhavya Sree(22D41A6205) which has been approved as it satisfies


academic requirements in respect of the work prescribed for II YEAR, I-SEMESTER of B. TECH course.

G.JYOTHSNA G.UMA MAHESWARI

(Internal guide) (Head of the department)


TABLE OF CONTENTS

SNO TOPIC PAGE NO

1 ABSTRACTION 1

2 INTRODUCTION 2

3 EXISTING SYSTEM 4

4 PROPOSED SYSTEM 6

5 HARDWARE AND SOFTWARE 8


REQUIREMENTS

6 IMPLEMENTATIONS 9

7 RESULTS 11

8 CONCLUSION 13
ABSTRACT

This project presents a temperature converter implemented in the C programming language.


The code provides functions to convert temperature values between Celsius, Fahrenheit , and
Kelvin scales. The conversion functionalities include Celsius to Fahrenheit, Celsius to
Kelvin, Fahrenheit to Celsius, Fahrenheit to Kelvin, Kelvin to Celsius, and Kelvin to
Fahrenheit

The program utilizes seven functions, each specializing in a specific temperature


conversion. The functions ‘Celsius to Fahrenheit’, ‘Fahrenheit to Celsius’,
‘Celsius to Kelvin’ , ‘Kelvin to Celsius’, ‘Fahrenheit to Kelvin’, and ‘Kelvin to
Fahrenheit’ accept temperature values as input parameters and return the converted
temperature in the desired unit.

The ‘main()’ function serves as the centra; control hub of the program, interacting with
the user via the standard input/ output mechanisms. Upon execution, it prompts the
user to enter a temperature value in Celsius, Fahrenheit, or Kelvin, as per their choice .
After receiving the input, the program utilizes the appropriate conversion functions to
display the converted temperature values in the desired units with two decimal places
precision.

The user-friendly interface of the program facilitates easy temperature conversions,


aiding individuals in various fields, such as science, engineering and everyday life, where
temperature unit conversions are essential.

This temperature converter project not only demonstrates the application of basic
mathematical formulas for temperature conversion but also serves as a practical tool for
users to effortlessly convert temperature values among different scales, enhancing their
convenience and usability.
INTRODUCTION

Temperature conversion is a fundamental aspect of everyday life, scientific research,


engineering, and various other fields. The ability to convert temperature values between
different scales—Celsius, Fahrenheit, and Kelvin—is essential for understanding weather
forecasts, conducting experiments, and maintaining accurate measurements across different
contexts.

This project implements a versatile temperature converter using the C programming


language. The program leverages a series of functions designed to perform precise and
efficient temperature conversions. The primary aim of this project is to offer users a
straightforward yet robust tool to effortlessly convert temperature values from one scale to
another.

The core functionality of the temperature converter lies in its utilization of mathematical
formulas that accurately translate temperature values between Celsius, Fahrenheit, and Kelvin.
The program consists of functions specifically tailored to handle each conversion seamlessly.

The first set of functions comprises the direct conversion formulas: Celsius to Fahrenheit,
Fahrenheit to Celsius , Celsius to kelvin, and kelvin to Celsius. These functions enable direct
transformations between Celsius, Fahrenheit, and Kelvin scales without the need for
intermediary steps, ensuring precision and simplicity in the conversion process.

Additionally, the converter incorporates intermediary conversion functions


Fahrenheit to kelvin and kelvin to Fahrenheit—to facilitate indirect conversions between
Fahrenheit and Kelvin via Celsius. These intermediary steps ensure accuracy in conversion
by leveraging the established relationships between the three temperature scales.
The main () function serves as the control center of the program, orchestrating user
interaction through a simple and intuitive interface. Upon execution, the program prompts
users to input temperature values in their desired scale—Celsius, Fahrenheit, or Kelvin. It
then seamlessly utilizes the appropriate conversion functions to display the converted
temperature values in the specified units with a precision of two decimal places.

This temperature converter project not only showcases the practical implementation
of temperature conversion algorithms in C but also aims to cater to a wide array of users.
Whether used by students, professionals, or enthusiasts in various domains, this tool provides
a valuable means of accurately converting temperature values, enhancing convenience and
efficiency in handling temperature-related calculations and analyses.

The user-friendly nature of this converter makes it an accessible tool for anyone
requiring swift and accurate temperature conversions. By bridging the gap between different
temperature scales, this C-based temperature converter aims to simplify tasks that involve
temperature measurements, fostering a deeper understanding and easier application of
temperature-related data across diverse fields.
EXISTING SYSTEM

The existing system is a temperature converter program developed in the C programming


language. It comprises a series of functions designed to convert temperature values between
Celsius, Fahrenheit, and Kelvin scales. The program structure includes functions for direct
conversions as well as intermediary conversions to ensure accuracy and flexibility in
temperature transformation.

The key functions within the system are:

1. Celsius to Fahrenheit Conversion (Celsius to Fahrenheit):

Accepts a temperature value in Celsius as input and returns the equivalent temperature in
Fahrenheit using the formula (Celsius * 9/5) + 32.

2. Fahrenheit to Celsius Conversion (Fahrenheit to Celsius):

Accepts a temperature value in Fahrenheit as input and returns the equivalent temperature
in Celsius using the formula (Fahrenheit - 32) * 5/9.

3.Celsius to Kelvin Conversion (Celsius to kelvin):

Accepts a temperature value in Celsius as input and returns the equivalent temperature in
Kelvin by adding 273.15 to the Celsius temperature.

4. Kelvin to Celsius Conversion (kelvin to Celsius):

Accepts a temperature value in Kelvin as input and returns the equivalent temperature in
Celsius by subtracting 273.15 from the Kelvin temperature.

5. Fahrenheit to Kelvin Conversion (Fahrenheit to kelvin):

Utilizes Fahrenheit to Celsius function to convert Fahrenheit to Celsius and then uses
Celsius to Kelvin to convert Celsius to Kelvin, acting as an intermediary step in converting
Fahrenheit to Kelvin.
6. Kelvin to Fahrenheit Conversion (Kelvin to Fahrenheit):

Utilizes Kelvin to Celsius function to convert Kelvin to Celsius and then uses
Celsius to Fahrenheit to convert Celsius to Fahrenheit, serving as an intermediary step in
converting Kelvin to Fahrenheit.

The main() function orchestrates the program's execution flow, providing a user-friendly
interface for interaction. It guides users through the process of entering temperature values in
either Celsius, Fahrenheit, or Kelvin. After receiving the input, the program uses the
appropriate conversion functions to calculate and display the converted temperature values in
the desired units with a precision of two decimal places.

This system simplifies temperature conversions for users across different domains,
enabling them to effortlessly switch between various temperature scales. It caters to students,
scientists, engineers, and individuals dealing with temperature-related calculations
by providing a reliable tool for accurate temperature transformations.

Overall, this existing system demonstrates the practical implementation of temperature


conversion algorithms in C, showcasing the versatility and efficiency of the programming
language in handling mathematical computations related to temperature units.
PROPOSED SYSTEM

Enhancing the existing temperature converter system, the proposed system aims to improve
usability, expand functionalities, and provide a more robust user interface. The objective is to
create a more versatile and intuitive tool for seamless temperature conversions across different
scales.

The enhancements and additional features in the proposed system include:

1. User-defined Conversion Selection:

Implement a menu-driven interface allowing users to select the conversion they desire
(Celsius to Fahrenheit, Fahrenheit to Celsius, Celsius to Kelvin, etc.) This enables users to
specifically choose the conversion they need without running the entire set of conversions
every time.

2. Validation and Error Handling:

Incorporate input validation to handle invalid temperature entries or unexpected characters.


Ensure the program prompts users to re-enter the temperature value in case of invalid inputs.

3. Support for Range Check:

Extend the system to check if entered temperature values fall within realistic temperature \
ranges for each scale (e.g., absolute zero as a lower limit for Kelvin scale, normal human body
temperature limits, etc.). Display appropriate messages for out-of-range inputs.

4. Modularization and Code Reusability:

Refactor the code into separate header and source files, allowing for better organization,
code reuse, and ease of maintenance. Dividing the functions into separate modules enhances
readability and reusability.

5. Additional Conversion Options:

Introduce additional temperature scales for conversion, such as Rankine, Delisle, Newton,
Réaumur, etc., providing users with a broader range of temperature scale options for conversion.
6. Flexible Precision Control:

Allow users to specify the precision of the output (decimal places) based on their
preferences. This flexibility enhances the adaptability of the system to various user
requirements.

7. Error Messages and Help Documentation:

Include informative error messages to guide users in case of incorrect inputs or unexpected
behavior. Additionally, provide a help section within the interface to explain the usage and
available options.

8. Interactive Interface Design:

Develop a more interactive and visually appealing user interface, utilizing ASCII art or
simple graphics to enhance user experience and engagement while using the program.

9. Unit Tests and Validation Suite:

Create a suite of unit tests to validate the correctness and accuracy of the conversion
functions, ensuring consistent and reliable results across different scenarios.

10.Dynamic Scaling Support:

Enable the system to handle extreme temperature values beyond typical human-use ranges,
accommodating scientific or specialized use cases.

This proposed system aims to elevate the functionality and usability of the temperature
converter by addressing user feedback, incorporating error handling mechanisms, and
expanding the range of supported conversions and input options. The system intends to offer a
more comprehensive and user-friendly tool for handling temperature-related calculations and
conversions in diverse contexts.
HARDWARE AND SOFTWARE REQUIREMENTS

1. HARDWARE REQUIREMENTS:

Processor: 12 th Gen Intel(R) Core T M i5-1235U

Hard Disk: Basic 476.92 GB

RAM : 16 GB

2. SOFTWARE REQUIREMENTS:

Operating System: Windows 11

Coding Language: C Language

IDE: Dev c++


IMPLEMENTATION

#include <stdio.h>

Float celsius_to_fahrenheit(float celsius) {


return (celsius * 9/5) + 32;
}

float fahrenheit_to_celsius(float fahrenheit) {


return (fahrenheit - 32) * 5/9;
}

float celsius_to_kelvin(float celsius) {


return celsius + 273.15;
}

float kelvin_to_celsius(float kelvin) {


return kelvin - 273.15;
}

float fahrenheit_to_kelvin(float fahrenheit) {


float celsius = fahrenheit_to_celsius(fahrenheit);
return celsius_to_kelvin(celsius);
}
float kelvin_to_fahrenheit(float kelvin) {
float celsius = kelvin_to_celsius(kelvin);
return celsius_to_fahrenheit(celsius);
}

int main() {
float temp;

printf("Enter temperature in Celsius: ");


scanf("%f", &temp);
printf("Celsius to Fahrenheit: %.2f\n", celsius_to_fahrenheit(temp));
printf("Celsius to Kelvin: %.2f\n", celsius_to_kelvin(temp));
printf("\nEnter temperature in Fahrenheit: ");
scanf("%f", &temp);
printf("Fahrenheit to Celsius: %.2f\n", fahrenheit_to_celsius(temp));
printf("Fahrenheit to Kelvin: %.2f\n", fahrenheit_to_kelvin(temp));

printf("\nEnter temperature in Kelvin: ");


scanf("%f", &temp);
printf("Kelvin to Celsius: %.2f\n", kelvin_to_celsius(temp));
printf("Kelvin to Fahrenheit: %.2f\n", kelvin_to_fahrenheit(temp));

return 0;
}
RESULTS
CONCLUSION

In conclusion, the temperature converter program in C language offers a straightforward


yet powerful tool for converting temperature values among Celsius, Fahrenheit, and Kelvin
scales. The implemented functions efficiently handle conversions, ensuring accuracy and
reliability in transformed values. This system's simplicity enables users from various
backgrounds to effortlessly perform temperature unit conversions, aiding both educational and
practical purposes.

While the current system provides a solid foundation for temperature transformations,
there exist opportunities for expansion and refinement. Future enhancements could focus on
incorporating additional temperature scales, implementing error handling for invalid inputs,
and refining the user interface for a more interactive experience. These improvements would
elevate the system's utility and appeal, catering to a broader range of user requirements in
fields such as science, engineering, and daily life applications. Overall, this temperature
converter lays the groundwork for further development, aiming to become a more
comprehensive and user-friendly tool for handling temperature-related calculations and
analyses.

You might also like