Computer Science, asked by nimishamaria, 6 months ago

A five digit integer is said to be friendly if the left most digit is divisible by 1, the left most 2-digits are divisible by 2, the left most 3-digits are divisible by 3, the left most 4-digits are divisible by 4 and the left most 5-digits are divisible by 5. Write a program to accept a number and perform the following: Check if the number is a 5-digit number, if not display an error message. If it is 5-digit number, then check if it is a friendly number or not based on the above description and display the output as friendly number, otherwise display the output as not a friendly number Sample input: Input number: 42325 Output: 42325 is a friendly number. 4 is divisible by 1, 42 is divisible by 2, 423 is divisible by 3, 4232 is divisible by 4, 42325 is divisible by 5.
write a java program to show the following

Answers

Answered by Akshattambi
0

Answer:

don't know but put ne in Brainlist please

Similar questions