SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package javaapplication1;
  6.  
  7. class A
  8.     {
  9.         int [] tab;
  10.  
  11.        
  12.        
  13.       A(int rozm)
  14.         {
  15.             tab=new int [rozm];
  16.  
  17.         }
  18.         void PrintTab()
  19.         {
  20.            
  21.             for (int i=0;i<tab.length;i++)
  22.             {
  23.                 for (int k=tab.length/2-2;k<tab.length/2+2;k++)
  24.                 tab[k]=1;
  25.                    
  26.                
  27.                 System.out.print(tab[i]+" ");
  28.             }
  29.            
  30.                
  31.  
  32.         }
  33. }
  34. /**
  35.  *
  36.  * @author U┼╝ytkownik
  37.  */
  38. public class JavaApplication1 {
  39.  
  40.     /**
  41.      * @param args the command line arguments
  42.      */
  43.  
  44.    
  45.     public static void main(String[] args) {
  46.        A p,l;
  47.        
  48.        l=new A(12);
  49.         l.PrintTab();
  50.  
  51.     }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top