Giter VIP home page Giter VIP logo

Comments (25)

jagdish4249 avatar jagdish4249 commented on July 30, 2024

package patternmore2;

/**
*

  • @author Jagdish Duwal
    */
    public class PatternMore2 {

    /**

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

      int i=0,x=2;
      do{
      x--;
      int j = 0;
      do{

          System.out.print(x + " ");
          j++;
          x++;
         
      }while(j<2);
      System.out.println();
      i++;
      

      }while(i<4);

    }

}

capture

from java.

maheshyakami avatar maheshyakami 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 newpatterns;

import javax.swing.JOptionPane;

/**
*

  • @author mahesh
    */
    public class NewPatterns {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      String p = "123456789";
      String rows = JOptionPane.showInputDialog("Enter No of Rows:");
      int i = 1;
      do {
      System.out.println(i + " " + (i + 1));
      //JOptionPane.showMessageDialog(null, i + " " + (i + 1) + "\n");
      i++;

      } while (i <= Integer.parseInt(rows))

    }

}
screen shot 2017-08-11 at 8 49 36 am
screen shot 2017-08-11 at 8 49 44 am

from java.

kiir33 avatar kiir33 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 pattern25;

/**
*

  • @author Kiran
    */
    public class Pattern25 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i=1,j=1,k=1;
      final int N=3;
      do{
      j=i;
      k=1;
      do{
      System.out.print(j+" ");
      j++;
      k++;
      }while(k<=2);
      System.out.println("");
      i++;
      }while(i<=4);
      }
      }

Output:
capture24

from java.

milan604 avatar milan604 commented on July 30, 2024

package pattern24;

import java.util.Scanner;

/**
*

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

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int n, i = 1, j = 1, c = 1;
      Scanner input = new Scanner(System.in);
      System.out.printf("Enter n=");
      n = input.nextInt();
      do {
      c = i;
      j = 1;
      do {
      System.out.printf("%d ", c);
      c++;
      j++;
      } while (j <= 2);
      System.out.println("");
      i++;
      } while (i <= n);
      }

}
screenshot from 2017-08-11 10-18-48

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

/**
*

  • @author DELL
    */
    public class Pattern23 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int a = 1, i = 1, b = 0;
      do {
      do {
      System.out.print(a + " ");
      b++;
      a++;
      } while (b < 2);
      a--;
      b = 0;
      System.out.println("");
      i++;
      } while (i <= 4);
      }
      }

OUTPUT
24

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

/**
*

  • @author Anish
    */
    public class Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i = 0, j, n = 4;
      do {
      j = 0;
      do {
      System.out.print(i + j + 1 + " ");
      j++;
      } while (j < 2);
      i++;
      System.out.println("");
      } while (i < n);
      }

}
p24

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

import java.util.Scanner;

/**
*

  • @author LORDsajan
    */
    public class Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      Scanner inp = new Scanner(System.in);
      System.out.println("Enter a number");
      int n = inp.nextInt();
      int i = 0;
      do {
      int j = 1;
      do {
      System.out.print(i + j + " ");
      j++;
      } while (j <= 2);
      System.out.println("");
      i++;
      } while (i < n);

    }

}
244

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

import java.util.Scanner;

/**
*

  • @author Dragon15423
    */
    public class Day10Patterns {

    /**

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

      Scanner input = new Scanner(System.in);

      System.out.println("Enter the length of pattern: ");

      int in = input.nextInt();

      int a = 1;

      for (int i = 0; i < in; i++) {

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

      }

    }

}
pattern24

from java.

ajay987 avatar ajay987 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 pattern24;

import java.util.Scanner;

/**
*

  • @author Dell
    */
    public class Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      Scanner in = new Scanner(System.in);
      System.out.println("Enter horizontal step");
      int p = 1, q = 2;
      int n = in.nextInt();
      System.out.println("output is:");
      for (int i = 1; i <= n; i++) {
      for (int j = p; j <= q; j++) {
      System.out.print(j + " ");
      }
      System.out.println("");
      p = q;
      q++;
      }

    }

}
sol24

from java.

kajalmaharjan avatar kajalmaharjan 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 pattern24;

import java.util.Scanner;

/**
*

  • @author kajal
    */
    public class Pattern24 {

    /**

    • @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 < 3; j++) {
      System.out.printf("%d ", i + j - 1);
      }
      System.out.println("");
      }
      }

}
24

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

/**
*

  • @author Kishorr
    */
    public class JavaApplication80 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i = 1, j = 1, k = 1;
      do {
      j = i;
      k = 1;
      do {
      System.out.print(j + " ");
      j++;
      k++;
      } while (k <= 2);
      System.out.println("");
      i++;
      } while (i <= 4);
      }

}
capture

from java.

AmritDuwal avatar AmritDuwal 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 pattern24;

/**
*

  • @author Amrit
    */
    public class Pattern24 {

    /**

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

      }
      }

}
upload 1

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

/**
*

  • @author dell
    */
    public class TaskFour {

    public static void main(String[] args) {
    int c, j;
    int i = 1;
    do {
    j = 1;
    do {
    c = (i + j);
    System.out.print(i + " " + c + " ");
    j++;

         } while (j < 2);
         System.out.println(" ");
         i++;
    
     } while (i < 4);
    

    }
    }
    c2

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

/**
*

  • @author nissus
    */
    public class P24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i=1,j=1,k=1;
      final int N=3;
      do{
      j=i;
      k=1;
      do{
      System.out.print(j+" ");
      j++;
      k++;
      }while(k<=2);
      System.out.println("");
      i++;
      }while(i<=4);
      }
      }

24

from java.

luckydivya avatar luckydivya commented on July 30, 2024

int i = 0, x = 2;
do {
x--;
int j = 0;
do {

            System.out.print(x + " ");
            j++;
            x++;

        } while (j < 2);
        System.out.println();
        i++;
    } while (i < 4);

}

}
patttern24

from java.

ragenmah avatar ragenmah commented on July 30, 2024

package patt24;

import java.util.Scanner;

/**
*

  • @author ragen
    */
    public class Patt24 {

    /**

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

Scanner input = new Scanner(System.in);

System.out.println("Enter the length of pattern: ");

int inp = input.nextInt();

int a = 1;

for (int i = 0; i < inp; i++) {

for (int j = 1; j <= 2; j++) {

 System.out.print(i + j + " ");

}
System.out.println();

}

}
}
fullscreen capture 8122017 51600 pm

from java.

 avatar commented on July 30, 2024

package day09pattern24;

/**
*

  • @author Samikshya
    */
    public class Day09Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      int s1 = 1, i = 1, s2 = 0;
      do {
      do {
      System.out.print(s1 + " ");
      s2++;
      s1++;
      } while (s2 < 2);
      s1--;
      s2 = 0;
      System.out.println("");
      i++;
      } while (i <= 4);

    }

}
capture

from java.

rivab avatar rivab commented on July 30, 2024

package day9pattern24;

import static java.lang.Integer.parseInt;
import javax.swing.JOptionPane;

/**
*

  • @author DELL
    */
    public class Day9pattern24 {

    /**

    • @param args the command line arguments
      */
      // TODO code application logic here
      public static void main(String[] args) {
      String c = "", b;
      int n = parseInt(JOptionPane.showInputDialog("Enter the number of row"));
      int m = parseInt(JOptionPane.showInputDialog("Enter the number of column"));
      int i = 0;

      do {
      b = " ";
      int j = 1;
      do {

           int a = j + i;
           b = b + a + " ";
           j++;
      
       } while (j <= m);
      
       c = c + b + "\n";
       i++;
      

      } while (i < n);
      JOptionPane.showMessageDialog(null, c, "Pattern 23", 1);

    }
    }
    day9pattern24-1
    day9pattern24-2
    day9pattern24-3

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

import java.util.Scanner;

/**
*

  • @author admin
    */
    public class Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
      System.out.println("Enter a number");
      int n = input.nextInt();
      int i = 0;
      do {
      int j = 1;
      do {
      System.out.print(i + j + " ");
      j++;
      } while (j <= 2);
      System.out.println("");
      i++;
      } while (i < n);
      }

}
capture

from java.

 avatar commented on July 30, 2024

package patterntwentyfour;

/**
*

  • @author User
    */
    public class PatternTwentyFour {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int a = 0, b;
      do {
      b = 1;
      do {
      System.out.print(a + b + " ");
      b++;
      } while (b <= 2);
      System.out.println("");
      a++;
      } while (a <= 3);

    }
    }
    1plus2

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

/**
*

  • @author sarumdr
    */
    public class Pattern25 {

    /**

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

// TODO code application logic here
int i = 0, j = 1;

    do {
        do {
            System.out.print(i + j + "   ");
            j++;
        } while (j < 3);
        System.out.println(" ");
        i++;
        j = 1;

    } while (i <= 3);

}

}

OUTPUT
image

from java.

Rajjushrestha avatar Rajjushrestha commented on July 30, 2024

public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter value for Row and Column");
int a = input.nextInt();
int b = input.nextInt();
int i = 0;
do {
int j = 1;
do {
System.out.print(i + j + " ");
j++;
} while (j <= b);
System.out.println("");
i++;
} while (i < a);
}
}
24

from java.

rituratnam avatar rituratnam commented on July 30, 2024

CODE:
package pattern24;

/**
*

  • @author User
    */
    public class Pattern24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int s1 = 1, i = 1, s2 = 0;
      do {
      do {
      System.out.print(s1 + " ");
      s2++;
      s1++;
      } while (s2 < 2);
      s1--;
      s2 = 0;
      System.out.println("");
      i++;
      } while (i <= 4);
      }
      }
      pattern24

from java.

Roshanshrestha7 avatar Roshanshrestha7 commented on July 30, 2024

public class Day9Ass1 {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    System.out.println("enter n:");
    int n = in.nextInt();

    for (int i = 1; i < n; i++) {

        for (int j = 1; j < 3; j++) {
            System.out.printf("%d ", i + j - 1);
        }
        System.out.println("");
    }
}

}

// TODO code application logic here
}

}

image

from java.

duwalshraddha avatar duwalshraddha 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 patternno24;

import java.util.Scanner;

/**
*

  • @author Lenovo
    */
    public class PatternNo24 {

    /**

    • @param args the command line arguments
      */
      public static void main(String[] args) {
      // TODO code application logic here
      int i, j, r, c;
      Scanner input = new Scanner(System.in);
      System.out.println("Enter the number of rows");
      r = input.nextInt();
      System.out.println("Enter the number of columns");
      c = input.nextInt();
      i = 0;
      do {
      j = 1;
      do {
      System.out.print(i + j + "");
      j++;
      } while (j <= c);
      System.out.println("");
      i++;
      } while (i <= r);
      }

}
2

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.