Advertisement
Guest User

County Names

a guest
Apr 23rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Program {
  4.  
  5. //Anthony Conner
  6. //County Names
  7. //4-23-19
  8.  
  9. public static void main(String[] args) {
  10. String [] counties = {"Arkansas\t", "Ashley\t", "Baxter\t", "Benton\t", "Boone\t", "Bradley\t", "Calhoun\t",
  11. "Carroll\t", "Chicot\t", "Clark\t", "Clay\t", "Cleburne\t", "Cleveland", "Columbia\t", "Conway\t",
  12. "Craighead", "Crawford\t", "Crittenden", "Cross\t", "Dallas\t", "Desha\t", "Drew\t", "Faulkner\t",
  13. "Franklin\t", "Fulton\t", "Garland\t", "Grant\t", "Greene\t", "Hempstead", "Hot Spring", "Howard\t",
  14. "Independence", "Izard\t", "Jackson\t", "Jefferson", "Johnson\t", "Lafayette", "Lawrence\t", "Lee\t",
  15. "Lincoln\t", "Little River", "Logan\t", "Lonoke\t", "Madison\t", "Marion\t", "Miller\t", "Mississippi",
  16. "Monroe\t", "Montgomery", "Nevada\t", "Newton\t", "Ouachita\t", "Perry\t", "Phillips\t", "Pike\t",
  17. "Poinsett\t", "Polk\t", "Pope\t", "Prairie\t", "Pulaski\t", "Randolph\t", "Saline\t", "Scott\t", "Searcy\t",
  18. "Sebastian", "Sevier\t", "Sharp\t", "St. Francis", "Stone\t", "Union\t", "Van Buren", "Washington",
  19. "White\t", "Woodruff\t", "Yell"};
  20.  
  21. Scanner sc = new Scanner (System.in);
  22.  
  23. System.out.println("How many Columns");
  24.  
  25. int column = sc.nextInt();
  26.  
  27. int i = 0;
  28.  
  29. for(int c = 0; c < counties.length; c++) {
  30. System.out.print(counties[c] + "\t");
  31. i = i + 1;
  32.  
  33. if (i == column) {
  34. i = 0;
  35. System.out.println();
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement