Compare commits

..

2 commits

Author SHA1 Message Date
Cameron Seamons
efd701241b updated java junk files 2026-01-08 00:04:18 -07:00
Cameron Seamons
8f0e6c6383 added notes to explain IF statement 2026-01-08 00:04:09 -07:00
2 changed files with 24 additions and 7 deletions

View file

@ -4,10 +4,8 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="8658cbac-7347-4046-83e8-57065c86d2b8" name="Changes" comment="made a basic calculator">
<change afterPath="$PROJECT_DIR$/practice_projects/src/GuessANumber.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/java_practice/WhileLoops.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/java_practice/WhileLoops.class" afterDir="false" />
<list default="true" id="8658cbac-7347-4046-83e8-57065c86d2b8" name="Changes" comment="java class file update">
<change beforePath="$PROJECT_DIR$/practice_projects/src/GuessANumber.java" beforeDir="false" afterPath="$PROJECT_DIR$/practice_projects/src/GuessANumber.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -122,7 +120,7 @@
<workItem from="1767557093354" duration="14440000" />
<workItem from="1767678323979" duration="16130000" />
<workItem from="1767837943314" duration="237000" />
<workItem from="1767838192168" duration="7995000" />
<workItem from="1767838192168" duration="8317000" />
</task>
<task id="LOCAL-00001" summary="updated module output folders">
<option name="closed" value="true" />
@ -300,7 +298,23 @@
<option name="project" value="LOCAL" />
<updated>1767853460560</updated>
</task>
<option name="localTasksCounter" value="23" />
<task id="LOCAL-00023" summary="coded a Random number Guessing game">
<option name="closed" value="true" />
<created>1767855592155</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1767855592155</updated>
</task>
<task id="LOCAL-00024" summary="java class file update">
<option name="closed" value="true" />
<created>1767855617721</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1767855617721</updated>
</task>
<option name="localTasksCounter" value="25" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -338,7 +352,9 @@
<MESSAGE value="Made a calculator using Switches" />
<MESSAGE value="Explored while and do while loops" />
<MESSAGE value="made a basic calculator" />
<option name="LAST_COMMIT_MESSAGE" value="made a basic calculator" />
<MESSAGE value="coded a Random number Guessing game" />
<MESSAGE value="java class file update" />
<option name="LAST_COMMIT_MESSAGE" value="java class file update" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />

View file

@ -25,6 +25,7 @@ public class GuessANumber {
System.out.print("\nEnter a guess: ");
guess = scanner.nextInt();
// because of how I structured the counting when the user reaches 1 chance left they lost.
if(chances == 1){
System.out.println("\n####### YOU LOSE!!! #######");
System.out.println("--- The number was [ " + number + " ] ---");