Question: 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,

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
Get step-by-step solutions from verified subject matter experts
