Вы находитесь на странице: 1из 3

Elga

In

Computer programming 2
Set b
Members:
Jason b pamatmat
Gelo cafino
Wayne cyvelle santos
Matthew solis
De La Salle University – Dasmariñas

College of Science

Computer Studies Department

JAVA PROGRAMMING LEC

(ITCS122)

MACHINE PROBLEM NO.1

(SET B)

1. Write a java program that asks for a value for seed and size and
display a certain

pattern on the screen.

Example: if seed=3; size = 4

45

678

9012

2. A census taker noticed that the number of children perform in Barrio


Mataray

ranges from 0-12. There are exactly 20 families in this place. Make a
java program

that would:

a) Input each family's size (Number of children)

b) Output how many families have at least 6 children

c) Output how many families have exactly 9 children

d) Output how many families have 4 children or less

e) Output how many families have no children

f) Total number of children in the barrio

g) Average family size for the whole barrio


3. Write a program, which accepts a 3-digit integer and displays the
digits of the

integer in ascending order. Example, given the input 938, the program
must

display 389. Assume that the integer entered has exactly 3 digits and
these digits

are unique.

Вам также может понравиться