This commit is contained in:
ldy
2026-03-01 23:18:55 -05:00
commit 67f753a5d1
3087 changed files with 218259 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Question5</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>

View File

@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@@ -0,0 +1,46 @@
public class PrintNumberInWord {
public static void main(String[] args) {
int number = 8;
if(number < 0 || number > 9) {
System.out.println("OTHER");
}
else {
if(number == 1) System.out.println("ONE");
if(number == 2) System.out.println("TWO");
if(number == 3) System.out.println("THREE");
if(number == 4) System.out.println("FOUR");
if(number == 5) System.out.println("FIVE");
if(number == 6) System.out.println("SIX");
if(number == 7) System.out.println("SEVEN");
if(number == 8) System.out.println("EIGHT");
if(number == 9) System.out.println("NINE");
}
switch(number) {
case 1:System.out.println("ONE");
break;
case 2:System.out.println("TWO");
break;
case 3:System.out.println("THREE");
break;
case 4:System.out.println("FOUR");
break;
case 5:System.out.println("FIVE");
break;
case 6:System.out.println("SIX");
break;
case 7:System.out.println("SEVEN");
break;
case 8:System.out.println("EIGHT");
break;
case 9:System.out.println("NINE");
break;
default:System.out.println("OTHER");
}
}
}