Computer Science, asked by ashishbhagat78, 8 months ago

Write a Java Program to input two digit number if it is a two digit number then display the sum of its digits otherwise display the message The number is not a two digit number.
Write in Java.lang

If you will help me I will mark you as brainlist.​

Answers

Answered by shivampandey87
0

Answer:

This program helps to check whether it is special two Digit number or not. Special Two Digit Number are number for which sum of it’s sum of it’s digits and product of it’s digits is equal to the original number.

OR we can say “A special two-digit number is such that when the sum of the digits is added to the product of its digits, the result is equal to the original two-digit number.” as per Question.

Example:

Suppose we have two Digit Number as 59

Then it is having first digit as 5 and second Digit as 9.

Please follow steps to check Special two Digit Number –

Calculate the sum of two digit and that will be 5+9 = 14

We have to calculate product of two digit and that will be 5*9 = 45

Calculate the sum of sum and product as calculate in above steps and that will be 14+45 = 59

And total calculated sum is equal to original number so we can say it is Special Two Digit Number.

Similar questions