×
FREE ASSISTANCE FOR THE INQUISITIVE PEOPLE
Tutorial Topics
X
softetechnologies
Write a programme in java to accept a number and print the sum of its prime digits. Write a programme to accept a word and display the alphabets in an alphabetical order.
Write a program in java to display the following pattern. - Java
5951    Arnab De    11/06/2018

Write a program in java to display the following pattern.

97 is the ASCII (American Standred Code for Information Interchange) code of small 'a'. If we increment the character variable then it turn to 98. i.e. 'b'. Now create a row and column

softetechnologies
public class Pattern
{
    public static void main(String []arg)
    {
            char ch=97;
            int r,c,s,n=5;
            
            for(r=0;r<n;r++)
            {
                ch=97;
                for(s=0;s<n-r;s++)
                {
                    System.out.print(" ");
                }
                for(c=0;c<=r;c++)
                {
                    System.out.print(ch);
                    ch++;
                }
                System.out.println("");
            }
    }
}
softetechnologies
Write a programme in java to accept a number and print the sum of its prime digits. Write a programme to accept a word and display the alphabets in an alphabetical order.
softetechnologies
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
Leo Tolstoy
However diffcult life may seem, there is always something you can do, and succeed at. It matters that you don not just give up.
Leo Tolstoy
2278
63.24
Today So Far
Total View (Lakh)
softetechnologies
26/05/2018     46575
25/06/2018     38729
01/01/2018     38407
28/06/2017     36337
02/08/2017     35042
01/08/2017     29315
06/07/2017     29071
15/05/2017     28600
14/07/2017     24430
11/09/2018     23464
softetechnologies