Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import java.io.*;
  2. //klasa wejscie
  3. public class Projekt14 {
  4.  
  5. public static void main(String[] args) {
  6. char znak = 'z';
  7. int i = 0;
  8. String linia="";
  9. BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
  10.  
  11. try{
  12. // znak = (char)System.in.read();
  13. linia=b.readLine();
  14. i = System.in.read();
  15. System.out.println("Podaj tekst");
  16. //System.out.println("Podałeś znak"+" " +znak);
  17. System.out.println("Podałeś znak"+" " +i);
  18. }
  19. catch(IOException e){
  20. System.out.println("Błąd wejścia");
  21. }
  22.  
  23. System.out.println("Podałeś tekst"+ " " +linia);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement