Giter VIP home page Giter VIP logo

Comments (24)

milan604 avatar milan604 commented on July 30, 2024

Pattern 4
package pattern4;

/**
*

  • @author m-lan
    */
    public class Pattern4 {

    /**

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

       for (int j = 0; j < i; j++) {
           System.out.printf(" ");
         
       }
         for (int k = 5; k > i; k--) {
               System.out.printf("*");
           }
       
       System.out.println("");
      

      }
      }

}

Output
screenshot from 2017-07-27 13-54-43

from java.

raBbn avatar raBbn commented on July 30, 2024

/*

  • 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 javaapplication15;

/**
*

  • @author Kishorr
    */
    public class JavaApplication15 {

    /**

    • @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 <=5; j++){
      if(j < i){
      System.out.printf(" ");
      } else {
      System.out.printf("*");
      }
      }
      System.out.println("");
      }
      }

}
capture4

from java.

jagdish4249 avatar jagdish4249 commented on July 30, 2024

package pattern7;

/**
*

  • @author jagdish
    */
    public class Pattern7 {

    /**

    • @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 <= 5; j++) {
       if(i>j)
           System.out.print(" ");
       else
           System.out.print("*");
      
       }
      

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

}

image

from java.

pujanchangubhari73 avatar pujanchangubhari73 commented on July 30, 2024

package forpattern6.java;

/**
*

  • @author Balkrsihna
    */
    public class ForPattern6Java {

    /**

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

       for (int a = 1; a <= i; a++) {
      
           System.out.printf(" ");
       }
       for (int j = 1; j <= (n + 1) - i; j++) {
      
           System.out.print("*");
      
       }
       System.out.printf("\n");
      

      }
      }

}
image

from java.

sthaanu avatar sthaanu commented on July 30, 2024

/*

  • 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 pattern5;

/**
*

  • @author admin
    */
    public class Pattern5 {

    /**

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

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

      }
      }

}
capture

from java.

sajanbasnet75 avatar sajanbasnet75 commented on July 30, 2024

/*

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) {
// pattern5
System.out.println("\nPattern5");
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= i; j++) {
System.out.print(" ");
}
for (int k = i; k <= 5; k++) {
System.out.print("*");
}

        System.out.println(" ");
    }

}
}
5

from java.

karmi214 avatar karmi214 commented on July 30, 2024

/*

  • 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 pattern5;

/**
*

  • @author Anish
    */
    public class Pattern5 {

    /**

    • @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; j++) {
      if (j>=i) {
      System.out.print(" * ");
      } else {
      System.out.print(" ");
      }
      }
      System.out.println("");
      }
      }
      }
      p5

from java.

syslin avatar syslin commented on July 30, 2024

/*

  • 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 PatternFive {

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

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

    }

}
output
4

from java.

bsnarnzt1 avatar bsnarnzt1 commented on July 30, 2024

package pattfive;

/**
*

  • @author User
    */
    public class PattFive {

    /**

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

from java.

kajalmaharjan avatar kajalmaharjan commented on July 30, 2024

//PATTERN 4
for (int i = 0; i < 5; i++) {
for (int j = 0; j < i; j++) {
System.out.printf(" ");
}
for (int k = 5; k > i; k--) {
System.out.printf("*");
}
System.out.printf("\n");
}

image

from java.

rabina12 avatar rabina12 commented on July 30, 2024

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

from java.

RakenShahi avatar RakenShahi commented on July 30, 2024

/*

  • 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 star5;

/**
*

  • @author DELL
    */
    public class Star5 {

    /**

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

       for (int k = 0; k < a; k++) {
               System.out.printf(" ");  
           }
       
       for (int j = 0; j < i; j++) {  
           System.out.printf("*");   
       }
       
       System.out.print("\n");
       a=a+1;        
      

      }
      }

}

OUTPUT
5

from java.

rituratnam avatar rituratnam commented on July 30, 2024

CODE:
package pattern5;

/**
*

  • @author Lavalesh
    */
    public class Pattern5 {

    /**

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

    System.out.println("");
    }
    }
    }
    Output:
    pattern5

from java.

Roshantwanabasu avatar Roshantwanabasu commented on July 30, 2024

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 pattern4;

/**
*

  • @author NiiRosh
    */
    public class Pattern4 {

    /**

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

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

      }
      }

}
Output:
pattern4

from java.

duwalshraddha avatar duwalshraddha commented on July 30, 2024

Code
package pattern5;

/**
*

  • @author Lenovo
    */
    public class Pattern5 {

    /**

    • @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 = 4; j >= 6 - i; j--) {
      System.out.print(" ");
      }
      for (int j = 1; j <= 6 - i; j++) {
      System.out.print("
      ");
      }
      System.out.println("");
      }
      }

}
4

from java.

Rajjushrestha avatar Rajjushrestha commented on July 30, 2024

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

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

4

from java.

sanzeevtamang avatar sanzeevtamang commented on July 30, 2024

Code:
package pattern5;

/**
*

  • @author Eev
    */
    public class PatterN5 {

    /**

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

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

      }
      }

}

Output:
image

from java.

Roshanshrestha7 avatar Roshanshrestha7 commented on July 30, 2024

public class Ass4 {

/**
 * @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(" ");
            }
        for (int k = 0; k < i; k++) {
                System.out.print("*");
            
        }
        System.out.print("\n");
    }

// TODO code application logic here
}

}

image

from java.

Sudan15423 avatar Sudan15423 commented on July 30, 2024

/*

  • 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 k = 1; k <= i; k++) {
      System.out.print(" ");
      }
      for (int j = i; j <= 5; j++) {
      System.out.print("
      ");
      }
      System.out.print("\n");
      }
      }
      Output:
      5

from java.

ajay987 avatar ajay987 commented on July 30, 2024

for (int i = 1; i <= 5; i++) {
for (int j = 1; j < i; j++) {
System.out.print(" ");
}
for (int k = 5; k >= i; k--) {
System.out.print("*");
}
System.out.println();
}
patt4sol

from java.

sarumdr avatar sarumdr commented on July 30, 2024

/*

  • 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 pattern5;

/**
*

  • @author sarumdr
    */
    public class Pattern5 {

    /**

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

       }
       for (int k = 0; k <=i; k++) {
           System.out.print("*");
       }
       System.out.println("");  
      

      }
      }

}
pattern5

from java.

SusanCB avatar SusanCB commented on July 30, 2024

/*

  • 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 pat5;

/**
*

  • @author nissus
    */
    public class Pat5 {

    /**

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

for (int j = 0; j < i; j++) {
System.out.printf(" ");

}
for (int k = 5; k > i; k--) {
System.out.printf("*");
}

System.out.println("");
}

    // TODO code application logic here
}

}
pat5

from java.

luckydivya avatar luckydivya commented on July 30, 2024
  • 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 pattren4.pkg1;

/**
*

  • @author PC
    */
    public class Pattren41 {

    /**

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

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

      }
      output
      pattern4

from java.

ragenmah avatar ragenmah commented on July 30, 2024

package pattern4;

/**
*

  • @author ragen
    */
    public class Pattern4 {

    /**

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

       for (int j = 0; j < i; j++) {
           System.out.printf(" ");
         
       }
         for (int k = 5; k > i; k--) {
               System.out.printf("*");
           }
       
       System.out.println("");
      

      }
      }

}

fullscreen capture 7312017 52443 pm

from java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.