Investigate_age'java by Kari Silpi - PowerPoint PPT Presentation

1 / 1
About This Presentation
Title:

Investigate_age'java by Kari Silpi

Description:

Investigate_age.java by Kari Silpi */ class Investigate_age ... adults ' adult(s)'); Kari Silpi (transl. Birgitta Jansson-Koponen, edited by JV) ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 2
Provided by: mami84
Category:

less

Transcript and Presenter's Notes

Title: Investigate_age'java by Kari Silpi


1
/ Investigate_age.java by Kari Silpiö
/ class Investigate_age public static
void main (String args) /
DEFINITIONS / int age
int minors 0 int adults 0
/ LOGICAL PART /
System.out.print ("Enter age (zero ends ) ")
age Keyboard.readInt ( )
while( age gt 0 )
if(age lt 18)
System.out.println ("Minor") minors
minors 1 else
System.out.println ("Adult") adults
adults 1
System.out.print ("Enter age (zero ends) ")
age Keyboard.readInt ( )
System.out.println (minors "
minor(s), " adults
" adult(s)")
Kari Silpiö (transl. Birgitta Jansson-Koponen,
edited by JV)
Write a Comment
User Comments (0)
About PowerShow.com