Fatmah adel - Task3 : Tempreture Converter#9
Open
faimah57 wants to merge 2 commits intoProgramming-Club-IAU:mainfrom
Open
Fatmah adel - Task3 : Tempreture Converter#9faimah57 wants to merge 2 commits intoProgramming-Club-IAU:mainfrom
faimah57 wants to merge 2 commits intoProgramming-Club-IAU:mainfrom
Conversation
added 2 commits
March 2, 2024 12:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code In java that convert between tempretures.
=========BRIFE ABOUT THE CODE========
The Program created to help the user wiht converting tempreture to the other tempreture by first started the program to show a menu
to let the user choice the wanted process.
and show to the user.
Other then these option, it will ask the user if it want to exit the program or he accedantlylet the cat walk on keybaord. If it yes
then the same result as exit choice ,else it will be asking to write a correct choice and show the menu again.
=========THE CODE========

import java.util.Scanner; public class App { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.println("===========Welcome To Temprture Converter Program==========="); int choice=0; double fah,cel; int answare; while (choice!=3){ System.out.print("Enter Your Choice\n1-Convert Celsius To Fahrenheit\n2-Convert Fahrenheit To Celsius\n3-Exit The Program\n>"); choice=input.nextInt(); if(choice==1){ System.out.print("Enter The Tempreture In Celsius: "); cel=input.nextDouble(); fah=cel*(9/5.0)+32.0; System.out.println("The Tempreture "+cel+" In Celsius Is Equalivent To "+fah+" In Fahrenheit"); System.out.println("======================================================="); } else if(choice==2){ System.out.print("Enter The Tempreture In Fahrenheit: "); fah=input.nextDouble(); cel=fah*(5/9.0)-32.0; System.out.println("The Tempreture "+fah+" In Fahrenheit Is Equalivent To "+cel+" In Celsius"); System.out.println("======================================================="); } else if(choice==3){ break; } else{ System.out.print("Are You Trying To Exit?\n1=Yes\t2=No\n>"); choice=input.nextInt(); if(choice==2){ System.out.print("Please Enter The Right Choice Again"); System.out.println("\n======================================================="); } if(choice==1) break; } } System.out.println("======================================================="); System.out.println(" Thank You For Using My Program\n\tPlease Rate Later\n"); } }=========THE OUTPUTS ========
========= CODE FILES ========
README.md