Java

Input an integer (n) and computes the value of a+aa+aaa in Java1 min read

Write a program that computes the value of a+aa+aaa+aaaa with a given digit as the value of a in Java.

Write a Java program that accepts an integer (n) and computes the value of n+nn+nnn.




Java Code:

Output:

Input an integer (n) and computes the value of a+aa+aaa in java

Input an integer (n) and computes the value of a+aa+aaa in java

Leave a Comment