add console_out_3

This commit is contained in:
Joel Baldauf
2020-09-10 13:00:34 +02:00
parent 1c100be2fe
commit 4756fa7609
5 changed files with 51 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
+1
View File
@@ -0,0 +1 @@
/bin/
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>console_out_3</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
@@ -0,0 +1,15 @@
package console_out_3;
public class console_out_3 {
public static void main(String[] args) {
System.out.printf("%-12s|%10s\n" , "Fahrenheit", "Celcius");
System.out.printf("%s\n" , "-----------------------");
System.out.printf("%+-12d|%10.2f\n" , -20, -28.8889);
System.out.printf("%+-12d|%10.2f\n" , -10, -23.3333);
System.out.printf("%+-12d|%10.2f\n" , 0, -17.7778);
System.out.printf("%+-12d|%10.2f\n" , 20, -6.6667);
System.out.printf("%+-12d|%10.2f\n" , 30, -1.1111);
}
}