Giter VIP home page Giter VIP logo

Comments (24)

milan604 avatar milan604 commented on July 30, 2024

package pattern12;

/**
*

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

    /**

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

       }
      
       System.out.println("");
      

      }
      }

}

screenshot from 2017-07-27 14-29-53

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

/**
*

  • @author Kishorr
    */
    public class JavaApplication24 {

    /**

    • @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 = 3; j >= i+1; j--) {
      if(i!=0)
      System.out.print(" ");
      else
      System.out.printf("7");
      }
      System.out.println("7");
      }
      }

}

capture12

from java.

jagdish4249 avatar jagdish4249 commented on July 30, 2024

package pattern11;

/**
*

  • @author jagdish
    */
    public class Pattern11 {

    /**

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

      for (int i = 4; i >= 1; i--) {
       if (i == 4){
           for (int j = 1; j <= 4; j++) {
                System.out.print("7");
           }
           System.out.println("");
          continue;
       }
       
       for (int j = 1; j <= i; j++) {
       if(i>j)
           System.out.print(" ");
       else
       System.out.print("7");
      
       }
      

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

}

image

from java.

pujanchangubhari73 avatar pujanchangubhari73 commented on July 30, 2024

package forpattern7;

/**
*

  • @author Balkrsihna
    */
    public class ForPattern7 {

    /**

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

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

           for (int k = a - 1; k >= i; k--) {
               System.out.printf(" ");
           }
           System.out.printf("7");
      
       }
      

      }
      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 pattern14;

/**
*

  • @author admin
    */
    public class Pattern14 {

    /**

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

}
capture

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

/**
*

  • @author Anish
    */
    public class Pattern14 {

    /**

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

}
p15

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) {
// pattern15
System.out.println("\nPattern 15");
for (int i = 1; i <= 5; i++) {
if (i == 1) {
for (int j = 1; j <= 5; j++) {
System.out.print(" 7 ");
}
} else {
for (int j = 1; j <= 5 - i; j++) {
System.out.print(" ");
}
for (int j = 1; j <= 1; j++) {
System.out.print(" 7 ");
}
}
System.out.println("");
}

}
}
15

from java.

kiir33 avatar kiir33 commented on July 30, 2024

package pattern6;

/**
*

  • @author KIRANN
    */
    public class Pattern6 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i, j;
      final int N = 7;
      System.out.println("Pattern 12\n----------------------");
      for (i = 0; i < N; i++) {
      for (j = N; j > i + 1; j--) {
      if (i == 0) {
      System.out.print("7 ");
      } else {
      System.out.print(" ");
      }
      }
      System.out.println("7");
      }
      }
      }

Output:
capture

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 NewClass {

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

     }
    

    }

}
output:
16

from java.

kajalmaharjan avatar kajalmaharjan commented on July 30, 2024
  //PATTERN 15
    for (int i = 5; i >= 0; i--) {
        for (int j = 0; j <= i; j++) {
            if (i == j || i == 5) {
                System.out.print("7 ");
            } else {
                System.out.print("  ");
            }
        }
        System.out.println("");
    }

image

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

/**
*

  • @author DELL
    */
    public class Q12 {

    /**

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

      for (int i = 3; i >=0; i--) {
      for (int j =i; j >=0; j--) {
      if(i==3)
      {
      System.out.print(7);
      }
      else if (i==j)
      {
      for (int k = j; k >0 ; k--) {
      System.out.printf(" ");
      }
      System.out.print(7);
      }

       }
       System.out.println("");
      

      }
      }

}

OUTPUT
12

from java.

rabina12 avatar rabina12 commented on July 30, 2024

package p12;

/**
*

  • @author Albina Praz
    */
    public class P12 {

    /**

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

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

/**
*

  • @author NiiRosh
    */
    public class Pattern15 {

    /**

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

}

Output:
pattern15

from java.

rivab avatar rivab commented on July 30, 2024

System.out.println("Output of Q.No.15");
for (int i = 0; i < 5; i++) {
for (int j = 5; j > 0; j--) {
if (i == j - 1 || i == 0) {
System.out.print("7 ");
} else {
System.out.print(" ");
}
}
System.out.println();
}

15

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 = 5; j > 0; j--) {
if (i == j - 1 || i == 0) {
System.out.print("7 ");
} else {
System.out.print(" ");
}
}
System.out.println();
}
15

from java.

bsnarnzt1 avatar bsnarnzt1 commented on July 30, 2024

package patternten5;

/**
*

  • @author User
    */
    public class PatternTen5 {

    /**

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

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 j = 5; j >= i; j--) {
      if (i == j || i == 1) {
      System.out.print("7");
      } else {
      System.out.print(" ");
      }
      }
      System.out.println();
      }
      }
      Output:
      14

from java.

ajay987 avatar ajay987 commented on July 30, 2024

for (int i = 1; i <= 5; i++) {
if (i == 1) {
for (int j = 1; j < 5; j++) {
System.out.print("7\t");
}
} else {
for (int k = 5; k > i; k--) {
System.out.print("\t");
}

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

patt15sol

from java.

duwalshraddha avatar duwalshraddha commented on July 30, 2024

Code
package pattern12;

/**
*

  • @author Lenovo
    */
    public class Pattern12 {

    /**

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

    }

}
15

from java.

rituratnam avatar rituratnam commented on July 30, 2024

CODE:
package pattern15;

/**
*

  • @author Lavalesh
    */
    public class Pattern15 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      int a = 5;
      for (int i = 1; i <= a; i++) {
      if (i == 1) {
      for (int j = 1; j <= a - 1; j++) {
      System.out.printf("7");
      }
      } else {
      System.out.printf("\n");

    for (int k = a - 1; k >= i; k--) {
    System.out.printf(" ");
    }
    System.out.printf("7");

}
}
System.out.printf("\n");
}
}
Output:
pattern15

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

/**
*

  • @author sarumdr
    */
    public class Pattern12 {

    /**

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

       }
       System.out.println("");
      

      }
      }

}

OUTPUT
image

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

/**
*

  • @author nissus
    */
    public class Pat12 {

    /**

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

}

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

}
pat12

from java.

sanzeevtamang avatar sanzeevtamang commented on July 30, 2024
// Pattern 15
    for (int i = 5; i > 0; i--) {
        for (int j = 1; j <= i; j++) {
            if (i == j || i == 5) {
                System.out.print("7");
            } else {
                System.out.print(" ");
            }
        }
        System.out.println();

    }

image

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

/**
*

  • @author PC
    */
    public class Pattern15 {

    /**

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

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

      }
      }
      }
      output

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.