public class Main { public static void main(String[] args) { //write your code here........ long sum=0; long Firstshu=9; for(int i=1;i<=10;i++) { sum=sum+Firstshu; Firstshu=Firstshu*10+9; } System.out.println(sum); } }
public class Main { public static void main(String[] args) { //write your code here........ long sum=0; long Firstshu=9; for(int i=1;i<=10;i++) { sum=sum+Firstshu; Firstshu=Firstshu*10+9; } System.out.println(sum); } }