Problem
Write a program in which we have to complete three parts:
- Part A: First, map 1, 3, 5, and 9 to the cube of their respective numbers and then print it.
- Part B: Initialize a flow from 1 to 100, filter it first with a condition (i.e.,
(number % 5 == 0)
), and then filter the flow as if it is an odd number or not and print the outcome. - Part C: Initialize a flow from “A” to “Z,” drop the first 15 letters, and then print them.
Restriction
The output will be available in the terminal.
Output
Output of Part A
1
27
125
729
Output of Part B
5
15
25
35
45
55
65
75
85
95
Output of Part C
P Q R S T U V W X Y Z
Get hands-on with 1200+ tech skills courses.