KeeganT

Ch6Ex5

Feb 20th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. package ch6ex5;
  2. import java.util.Scanner;
  3.  
  4. public class Ch6Ex5
  5. {
  6.     public static void main(String[] args)
  7.     {
  8.         Scanner sc=new Scanner(System.in);
  9.         System.out.print("Enter a positive integer: ");
  10.         String str=sc.nextLine();
  11.         for(int c=0;c<str.length();c++) System.out.println(str.charAt(c));
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment