This is what i have so far, i know its really bad...
Expand|Select|Wrap|Line Numbers
- public class punctuation
- {
- public static void main(String[] args)
- {
- int sentence, length, even=%2, odd=%1;
- char question=?, exclamation=!, other=.;
- System.out.println("Enter a sentence.");
- sentence = SavitchIn.readLineInt();
- int length = sentence.length()
- if ( length == even , question)
- System.out.println("YES");
- else (sentence%1 == odd, question)
- System.out.println("NO");
- if (exclamation)
- System.out.println("WOW");
- if (other)
- System.out.println("You always say" + sentence);
- System.out.println("Press enter key to end program.");
- String junk;
- junk = SavitchIn.readLine();
- }
- }