File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
app/src/main/java/io/github/project516/JavaTemperatureConverter Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class Main {
88
99 public static void main (String [] args ) {
1010
11- System .out .println (info .vendor ());
11+ System .out .println ("Vendor: " + info .vendor ());
1212 Runtime run = new Runtime ();
1313 run .run ();
1414 }
Original file line number Diff line number Diff line change @@ -7,20 +7,22 @@ public class Runtime {
77
88 Scanner scan = new Scanner (System .in , StandardCharsets .UTF_8 .name ());
99 ConvertTemp temp = new ConvertTemp ();
10+ Text text = new Text ();
1011
1112 void run () {
1213
1314 try {
15+ text .printInst ();
1416 String input = scan .nextLine ().toLowerCase ();
1517
1618 if (input .equals ("f" )) {
17- System .out .print ("Enter Celcus : " );
19+ System .out .print ("Enter Celsius : " );
1820 Double cel = scan .nextDouble ();
19- System .out .println ("Farenghit : " + temp .cToF (cel ));
21+ System .out .println ("Fahrenheit : " + temp .cToF (cel ));
2022 } else if (input .equals ("c" )) {
21- System .out .print ("Enter Farenghitght : " );
23+ System .out .print ("Enter Fahrenheit : " );
2224 Double far = scan .nextDouble ();
23- System .out .println ("Celcius : " + temp .fToC (far ));
25+ System .out .println ("Celsius : " + temp .fToC (far ));
2426 } else {
2527 System .out .println ("Invalid input!" );
2628 }
Original file line number Diff line number Diff line change 33public class Text {
44 void printInst () {
55 System .out .println (
6- "Enter f to convert Celcius to Farenght and c to convert Farenght to Celceus \n " );
6+ "Enter f to convert Celsius to Fahrenheit and c to convert Fahrenheit to Celsius \n " );
77 }
88}
You can’t perform that action at this time.
0 commit comments