Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Zad3 {
- void wczytanie() {
- Scanner sc = new Scanner(System.in);
- System.out.println("podaj A - liczbe calkowita ");
- double a = sc.nextDouble();
- System.out.println("podaj B - liczbe calkowita ");
- double b = sc.nextDouble();
- new Zad3().sprawdzenie(a, b);
- new Zad3().jakiMaZnak(a,b);
- }
- void sprawdzenie(double a, double b) {
- if (a < b) {
- System.out.println("liczba B jest większa od A");
- }
- else if (b > a) {
- System.out.println("liczba A jest wieksza od B");
- }
- else {
- System.out.println("liczby są równe");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement