Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner scanner1 = new Scanner(System.in);
- String string1 = "";
- int int1 = 0;
- double double1 = 0;
- int counter = 0;
- while(scanner1.hasNext())
- {
- counter++;
- string1 = scanner1.next();
- if((counter%2)==0){
- //zahl
- if(string1.contains(",")){
- double1 = Double.valueOf(string1);
- System.out.println(drawBar(string1 , double1));
- } else {
- int1 = Integer.valueOf(string1);
- System.out.println(drawBar(string1 , int1));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment