Are You Feeling any difficulity while writing Core-Java Programs. Send those to me Here.

Series Programs

Here you can find all type of series programs (if i miss any series please send me in Here)

Program: 1


public class HelloWorld{
     public static void main(String []args){
        for(int i=0;i<10;i++){
            for(int j=0;j<10;j++){
                System.out.print("*");
            }
            System.out.println("");
        }
     }
}

Output:
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *  *
Program: 2
public class HelloWorld{
     public static void main(String []args){
        for(int i=0;i<10;i++){
            for(int j=0;j<i;j++){
                System.out.print("*");
            }
            System.out.println("");
        }
     }
}
Output:
*
*  *
*  *  *
*  *  *  *
*  *  *  *  *
*  *  *  *  *  *
*  *  *  *  *  *  *
*  *  *  *  *  *  *  *
*  *  *  *  *  *  *  *  *

No comments:

Post a Comment