Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Java-Lab-003.iml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="openjdk-21" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
6 changes: 6 additions & 0 deletions src/.gitkeep
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
public class TempConvert {

public static void main(String[] args) {
int = 12;
System.out.printf("%f int");
}
}
49 changes: 49 additions & 0 deletions src/TempConvert.java
Original file line number Diff line number Diff line change
@@ -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);
}
}
**/
Binary file added src/error001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/error002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/error003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.