WAP in java to input a number from user and print its square and cube.
Answers
Answered by
0
Answer:
Explanation:
zab-vzwf-txa
Answered by
1
Explanation:
Import the Scanner.
Declare the class as public.
Add the void main function.
Add system. out. println() function with the message to enter number.
Declare input as Scanner.
Take the inputs and save it in variables.
Add a loop and calculate cube of each digit.
Add system. out. println() function to
Similar questions
Business Studies,
3 months ago
Math,
3 months ago