Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using java language .. Objec Oriented Program. Review Questions 1 Question-1: Write a program that reads a sequence of positive integer numbers from the keyboard,

image text in transcribed

Using java language .. Objec Oriented Program.

Review Questions 1 Question-1: Write a program that reads a sequence of positive integer numbers from the keyboard, terminated by a 0. i.e. the user will type 0 when he want to stop. Then count the following: 1. 2. 3. The number of even numbers. The number of prime numbers. The number of Square numbers (x = i^2, where i is an integer.) Question-2 Using a nested loop, write a program that displays the following three matrices for any integer N: N=5 12345 23456 3 45 67 45678 56789 1 2 34 5 6 789 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Question-3 Write a program that reads a string and an integer from the keyboard: s1 and N. Then using loops print all possible substrings in s1 with the length of N Example s1-"hello", N 2, output: he el II lo Question-4 Repeat question 3, while you are allowed to remove any characters from the middle Example s1-"hello", N 2, output: he hl hl ho el el eo Il lo lo

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions