diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..3343960 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 54db2d4..3ca7a21 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,6 +2,7 @@ + diff --git a/Java-Lab-003.iml b/Java-Lab-003.iml index b46c0dd..18a3d6a 100644 --- a/Java-Lab-003.iml +++ b/Java-Lab-003.iml @@ -5,6 +5,7 @@ + \ No newline at end of file diff --git a/src/.gitkeep b/src/.gitkeep index 8b13789..e74f8c0 100644 --- a/src/.gitkeep +++ b/src/.gitkeep @@ -1 +1,7 @@ +public class TempConvert { + public static void main(String[] args) { + int = 12; + System.out.printf("%f int"); + } +} diff --git a/src/TempConvert.java b/src/TempConvert.java new file mode 100644 index 0000000..35019b5 --- /dev/null +++ b/src/TempConvert.java @@ -0,0 +1,49 @@ +/** + * @author Jenny Li + * @ Version 1.0 + * 2/3/24 + */ + +public class TempConvert { + public static void main(String[] args) { + int y; + y = 12; + double pi = 12; + System.out.printf("%d seconds %f seconds",y,pi); + } +} + +/** + import java.util.Scanner; +public class TempConvert { + public static void main (String args[]) { + double fahrenheit, celsius; + Scanner in = new Scanner(System.in); + System.out.print("Enter a temperature in Celsius: "); + celsius = in.nextDouble(); + fahrenheit = ((celsius * (9/5)) + 32); + System.out.println(celsius = fahrenheit); + + } +} +**/ + +/** +import java.util.Scanner; + +public class TempConvert { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + + System.out.print("Enter a total number of seconds: "); + int seconds = input.nextInt(); + + int hour= seconds/3600; + int second = seconds%60; + seconds=seconds%3600; + int min=seconds/60; + + System.out.printf( seconds + "seconds = " + "%d hours, %d minutes, %d seconds", hour,min,second); + } +} +**/ \ No newline at end of file diff --git a/src/error001.png b/src/error001.png new file mode 100644 index 0000000..8caa2ff Binary files /dev/null and b/src/error001.png differ diff --git a/src/error002.png b/src/error002.png new file mode 100644 index 0000000..41fb514 Binary files /dev/null and b/src/error002.png differ diff --git a/src/error003.png b/src/error003.png new file mode 100644 index 0000000..29849bf Binary files /dev/null and b/src/error003.png differ