Guest User

Untitled

a guest
Apr 2nd, 2012
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1.         Scanner scanner1 = new Scanner(System.in);
  2.         String string1 = "";
  3.         int int1 = 0;
  4.         double double1 = 0;
  5.  
  6.         int counter = 0;
  7.        
  8.         while(scanner1.hasNext())
  9.         {  
  10.             counter++;
  11.             string1 = scanner1.next();     
  12.            
  13.             if((counter%2)==0){
  14.                 //zahl
  15.                 if(string1.contains(",")){
  16.                     double1 = Double.valueOf(string1);
  17.                     System.out.println(drawBar(string1 , double1));
  18.                 } else {
  19.                     int1 = Integer.valueOf(string1);
  20.                     System.out.println(drawBar(string1 , int1));
  21.                 }
  22.             }
  23.  
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment