SHARE
TWEET

County names

Nikki12345671 Apr 23rd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Program {
  4.     //Nikki Forehand
  5.  
  6.     //County Names
  7.     public static void main(String[] args) {
  8.         String [] counties = {"Arkansas\t", "Ashley\t", "Baxter\t", "Benton\t", "Boone\t", "Bradley\t", "Calhoun\t",
  9.                 "Carroll\t", "Chicot\t", "Clark\t", "Clay\t", "Cleburne\t", "Cleveland", "Columbia\t", "Conway\t",
  10.                 "Craighead", "Crawford\t", "Crittenden", "Cross\t", "Dallas\t", "Desha\t", "Drew\t", "Faulkner\t",
  11.                 "Franklin\t", "Fulton\t", "Garland\t", "Grant\t", "Greene\t", "Hempstead", "Hot Spring", "Howard\t",
  12.                 "Independence", "Izard\t", "Jackson\t", "Jefferson", "Johnson\t", "Lafayette", "Lawrence\t", "Lee\t",
  13.                 "Lincoln\t", "Little River", "Logan\t", "Lonoke\t", "Madison\t", "Marion\t", "Miller\t", "Mississippi",
  14.                 "Monroe\t", "Montgomery", "Nevada\t", "Newton\t", "Ouachita\t", "Perry\t", "Phillips\t", "Pike\t",
  15.                 "Poinsett\t", "Polk\t", "Pope\t", "Prairie\t", "Pulaski\t", "Randolph\t", "Saline\t", "Scott\t", "Searcy\t",
  16.                 "Sebastian", "Sevier\t", "Sharp\t", "St. Francis", "Stone\t", "Union\t", "Van Buren", "Washington",
  17.                 "White\t", "Woodruff\t", "Yell"};
  18.        
  19.         //Import scanner
  20.         Scanner sc = new Scanner (System.in);
  21.        
  22.         //Asking how many
  23.         System.out.println("How many columns ?");
  24.        
  25.         //Column naming
  26.          int column = sc.nextInt();
  27.            
  28.          int i=0;
  29.                
  30.            
  31.         // making the collums go into how ever many collums are asked for      
  32.             for(int c = 0; c < counties.length; c++) {
  33.                     System.out.print(counties[c] +"\t");
  34.                        
  35.             i=i+1;
  36.            
  37.             if(i==column) {
  38.                 i=0;
  39.                 System.out.println();
  40.             }
  41.            
  42.            
  43.             }
  44.            
  45.     }
  46. }
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