0% found this document useful (0 votes)
22 views1 page

Activity1 Oop

The document contains three Java programming problems: printing a pattern of letters and spaces, multiplying two user-input numbers, and formatting a poem string in blocks of text.

Uploaded by

Christian Joshua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Activity1 Oop

The document contains three Java programming problems: printing a pattern of letters and spaces, multiplying two user-input numbers, and formatting a poem string in blocks of text.

Uploaded by

Christian Joshua
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a Java program to display the following pattern.

Sample Pattern :
J a v v a
J a a v v a a
J J aaaaa V V aaaaa
JJ a a V a a

2. Write a Java program to multiply two numbers.


Input Data:
Input the first number: 10
Input the second number: 11

Expected Output
Product of two binary numbers: 110

3. Write a Java program to print the following string in a specific format


(see output).

Sample Output
Twinkle, twinkle, little star,
How I wonder what you are!
Up above the world so high,
Like a diamond in the sky.
Twinkle, twinkle, little star,
How I wonder what you are

You might also like