Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package program1;
- import java.io.*;
- public class Program1 {
- public static void main(String[] args)throws IOException {
- BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
- BufferedWriter wk = new BufferedWriter(new FileWriter("wynik.txt"));
- System.out.println("Podaj liczbe 1");
- String a = br.readLine();
- System.out.println("Podaj liczbe 2");
- String b = br.readLine();
- int c=Integer.parseInt(a);
- int d=Integer.parseInt(b);
- int e = c+d;
- String f = " Suma wynosi ";
- String g = "Twoje liczby to ";
- String h = " i ";
- System.out.println(f+e);
- wk.write(g+c+h+d+f+e);
- br.close();
- wk.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement