Last active
November 4, 2016 06:42
-
-
Save EddyLuten/95c5dd446ba35d22c93b007f240bcebf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String args[]) { | |
{ | |
Scanner input = new Scanner (System.in); | |
int purchases = 0; // init purchases | |
char firstLetter; | |
do | |
{ | |
// TODO: print some shit on the screen here | |
// all the things all at once | |
firstLetter = Character.toLowerCase( input.nextLine().charAt(0) ); | |
if (firstLetter == 'p') { | |
// process the purchase | |
++purchases; // or whatever you're supposed to do. | |
} | |
} while (firstLetter != 's'); // let's go do the next thing! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment