import java.util.Scanner;

class Assignment6E
{
	public static void main (String[] args)
	{
		 int total=0;
         int n;
         int number=1;
         int originalNumber;
         int howmany;
         int choice;
         int digit;
         
         Scanner input = new Scanner (System.in);
         System.out.println("This program will add the digits of the numbers from 1 to 100 ");
         System.out.println("Please type in a number ");
	     howmany=input.nextInt();
         for (n=1; n<=howmany; n++)
         {
        	
				total=0;
		        originalNumber=n;
		        number=n;
		         
		              
						do  //get the digits
						{
							digit=number%10;
							number=number/10;
							total=total+digit;
							
						}while(number>0);
						
						System.out.printf("The sum of the digits of %d is %d ",originalNumber,total );
		                System.out.println(" ");
		                
						
					  	
			}
		    
	  
			}
} 