Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit Pattern2 #2

Closed
ErSKS opened this issue Jul 27, 2017 · 27 comments
Closed

Submit Pattern2 #2

ErSKS opened this issue Jul 27, 2017 · 27 comments

Comments

@ErSKS
Copy link
Owner

ErSKS commented Jul 27, 2017

pattern2

@milan604
Copy link

Pattern 2
package pattern2;

/**
*

  • @author m-lan
    */
    public class Pattern2

{

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
      for (int i = 0; i < 5; i++) {
        for (int j = 5; j > i; j--) {
            System.out.printf("*");
        }
        System.out.println("");
    }
}

}

Output
screenshot from 2017-07-27 13-49-34

@raBbn
Copy link

raBbn commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package javaapplication12;

/**
*

  • @author Kishorr
    */
    public class JavaApplication12 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for (int i = 0; i < 5; i++) {
      for (int j = 5; j >= i; j--) {
      System.out.print("
      ");
      }
      System.out.println(" ");
      }
      }
      }

}
capture2

@jagdish4249
Copy link

package pattern2;

/**
*

  • @author jagdish
    */
    public class Pattern2 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here

      for (int i = 5; i >= 1; i--) {

       for (int j = 1; j <= i; j++) {
       System.out.print("*");    
       }
      

      System.out.println("");
      }
      }

}

image

@pujanchangubhari73
Copy link

package forpattern1;

/**
*

  • @author Balkrsihna
    */
    public class ForPattern1 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int n = 5;
      for (int i = 1; i <= n; i++) {

       for (int j = n; j >= i; j--) {
      
           System.out.print("*");
      
       }
      
       System.out.println();
      

      }
      }
      }
      image

@maheshyakami
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern;

/**
*

  • @author mahesh
    */
    public class Pattern {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      //1
      for (int i = 0; i < 5; i++) {
      for (int j = 5; j > i; j--) {
      System.out.print("
      ");
      }
      System.out.println(" ");
      }
      System.out.println();
      }

}
screen shot 2017-07-27 at 5 01 31 pm

@sthaanu
Copy link

sthaanu commented Jul 27, 2017

public static void main(String[] args) {
    for (int i = 0; i < 5; i++) {
        for (int j = 0; j < 5 - i; j++) {

            System.out.print("*");

        }
        System.out.println(" ");
    }

capture

@sajanbasnet75
Copy link

/*

To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
/
package assignment2;
/
*
*

@author LORDsajan
*/
public class Assignment2 {

/**

@param args the command line arguments
/
public static void main(String[] args) {
// pattern3
System.out.println("\nPattern3");
for (int i = 1; i <= 5; i++) {
for (int j = 5; j >= i; j--) {
System.out.print("*");
}
System.out.println(" ");
}
}
}
3

@karmi214
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern3;

/**
*

  • @author Anish
    */
    public class Pattern3 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i = 5; i > 0; i--) {
      for (int j = 0; j < i; j++) {
      System.out.printf(" * ");
      }
      System.out.println("");
      }
      }

}
p3

@syslin
Copy link

syslin commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package patterntwo;

/**
*

  • @author dell
    */
    public class PatterFour {

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

    }

}
output
2

@ghost
Copy link

ghost commented Jul 27, 2017

package pattthree;

/**
*

  • @author User
    */
    public class PattThree {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for (int i = 1; i <= 5; i++) {
      for (int j = 5; j >= i; j--) {
      System.out.print("
      ");
      }
      System.out.println(" ");
      }
      }
      Output:
      patt3

@kajalmaharjan
Copy link

kajalmaharjan commented Jul 27, 2017

//PATTERN 2
for (inti = 5; i> 0; i--) {
for (int j = 0; j <i; j++) {
System.out.printf("*");
}
System.out.println();
}
image

@rabina12
Copy link

System.out.println("--------------Pattern 2\n----------------------");
for (int i = 0; i < 5; i++) {
for (int j = 0; j <= i; j++) {
System.out.print("*");
}
System.out.println("");
}
capture2

@RakenShahi
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package star3;

/**
*

  • @author DELL
    */
    public class Star3 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i = 5; i > 0; i--) {
      for (int j = 0; j < i; j++) {
      System.out.printf("
      ");

       }
       System.out.print("\n");
      

      }
      }

}

OUTPUT
2

@rituratnam
Copy link

CODE:
package pattern2;

/**
*

  • @author Lavalesh
    */
    public class Pattern2 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      for (int i = 1; i <= 5; i++) {
      for (int j = i; j >0 ; j--) {

           System.out.printf("*");
       }
       System.out.println("");      
      

      }

    }

}
Output:
pattern2

@rivab
Copy link

rivab commented Jul 27, 2017

package starstar3;

/**
*

  • @author DELL
    */
    public class StarStar3 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5-i; j++) {
      System.out.print("
      \t");
      }
      System.out.println("");

      }
      }

}
starstar3

@Roshantwanabasu
Copy link

Code:
/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern2;

/**
*

  • @author NiiRosh
    */
    public class Pattern2 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i = 0; i <= 5; i++) {
      for (int j = 0; j < i; j++) {
      System.out.printf("
      ");

       }
       System.out.println("");
      

      }
      }

}
Output:
pattern2

@leoprabin10
Copy link

public static void main(String[] args) {
// TODO code application logic here
System.out.println("Pattern 1\n");
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
System.out.print("*");
}
System.out.println("");
}
capture2

@duwalshraddha
Copy link

duwalshraddha commented Jul 27, 2017

Code
package pattern3;

/**
*

  • @author Lenovo
    */
    public class Pattern3 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i = 1; i <= 5; i++) {
      for (int j = 1; j <= 6 - i; j++) {
      System.out.print("
      ");
      }
      System.out.println("");
      }
      }

}
1

@Rajjushrestha
Copy link

public static void main(String[] args)
{
for (int i = 5; i > 0; i--)
{
for (int j = i; j >0; j--)
{
System.out.print("*");
}
System.out.print("\n");
}

2 2
}

@sanzeevtamang
Copy link

sanzeevtamang commented Jul 27, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package patten3;

/**
*

  • @author Eev
    */
    public class PatteN3 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5 - i; j++) {
      System.out.print("
      ");
      }
      System.out.println();

      }
      }

}

pattern 3

@Roshanshrestha7
Copy link

public class Ass2 {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    for (int i = 0; i < 6; i++) {
        for (int j = 0; j < i; j++) {
            System.out.print("*");
        }
        System.out.print("\n");
    }

// TODO code application logic here
}

}

image

@Sudan15423
Copy link

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package day3;

/**
*

  • @author dragon15423
    */
    public class Day3 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      for (int i = 1; i <= 5; i++) {
      for (int j = i; j <= 5; j++) {
      System.out.print(" * ");
      }
      System.out.println();
      }
      Output:
      2

@ajay987
Copy link

ajay987 commented Jul 29, 2017

for (int i = 5; i > 0; i--) {
for (int j = i; j > 0; j--) {
System.out.print("*");

        }
        System.out.println();
    }

patt2sol

@sarumdr
Copy link

sarumdr commented Jul 29, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern3;

/**
*

  • @author sarumdr
    */
    public class Pattern3 {

    /**

    • @param args the co0mmand line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i =5; i >=0; i--) {
      for (int j =0; j <i; j++) {
      System.out.printf("
      ");
      }
      System.out.printf("\n");
      }

    }

}
OUTPUT

pattern2

1 similar comment
@sarumdr
Copy link

sarumdr commented Jul 29, 2017

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package pattern3;

/**
*

  • @author sarumdr
    */
    public class Pattern3 {

    /**

    • @param args the co0mmand line arguments
      /
      public static void main(String[] args) {
      // TODO code application logic here
      for (int i =5; i >=0; i--) {
      for (int j =0; j <i; j++) {
      System.out.printf("
      ");
      }
      System.out.printf("\n");
      }

    }

}
OUTPUT

pattern2

@luckydivya
Copy link

code for pattern 2.

package pattern2;

/**
*

  • @author PC
    */
    public class Pattern2 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for(int i = 1; i <= 5; i++) {
      for (int j =i; j > 0; j--) {
      System.out.print("
      ");

       }
       System.out.println("");
      

      }
      }

}
output

pattern2

@ragenmah
Copy link

package pattern2;

/**
*

  • @author ragen
    */
    public class Pattern2 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for (int i = 0; i < 5; i++) {
      for (int j = 5; j > i; j--) {
      System.out.printf("
      ");
      }
      System.out.println("");
      }
      }

}

Output




**
*

@ErSKS ErSKS closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests