Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Program {
- //Nikki Forehand
- //County Names
- public static void main(String[] args) {
- String [] counties = {"Arkansas\t", "Ashley\t", "Baxter\t", "Benton\t", "Boone\t", "Bradley\t", "Calhoun\t",
- "Carroll\t", "Chicot\t", "Clark\t", "Clay\t", "Cleburne\t", "Cleveland", "Columbia\t", "Conway\t",
- "Craighead", "Crawford\t", "Crittenden", "Cross\t", "Dallas\t", "Desha\t", "Drew\t", "Faulkner\t",
- "Franklin\t", "Fulton\t", "Garland\t", "Grant\t", "Greene\t", "Hempstead", "Hot Spring", "Howard\t",
- "Independence", "Izard\t", "Jackson\t", "Jefferson", "Johnson\t", "Lafayette", "Lawrence\t", "Lee\t",
- "Lincoln\t", "Little River", "Logan\t", "Lonoke\t", "Madison\t", "Marion\t", "Miller\t", "Mississippi",
- "Monroe\t", "Montgomery", "Nevada\t", "Newton\t", "Ouachita\t", "Perry\t", "Phillips\t", "Pike\t",
- "Poinsett\t", "Polk\t", "Pope\t", "Prairie\t", "Pulaski\t", "Randolph\t", "Saline\t", "Scott\t", "Searcy\t",
- "Sebastian", "Sevier\t", "Sharp\t", "St. Francis", "Stone\t", "Union\t", "Van Buren", "Washington",
- "White\t", "Woodruff\t", "Yell"};
- //Import scanner
- Scanner sc = new Scanner (System.in);
- //Asking how many
- System.out.println("How many columns ?");
- //Column naming
- int column = sc.nextInt();
- int i=0;
- // making the collums go into how ever many collums are asked for
- for(int c = 0; c < counties.length; c++) {
- System.out.print(counties[c] +"\t");
- i=i+1;
- if(i==column) {
- i=0;
- System.out.println();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement