Napisz program sumujący liczby np. 2+2=4 W języku JAVA. NETBEANS najlepiej.
import java.util.Scanner;
public class suma {
public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("Podaj a"); int a=sc.nextInt(); System.out.println("Podaj b"); int b=sc.nextInt(); System.out.println("Suma "+a+"+"+b+"="+ (a+b));
}
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
import java.util.Scanner;
public class suma {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
System.out.println("Podaj a");
int a=sc.nextInt();
System.out.println("Podaj b");
int b=sc.nextInt();
System.out.println("Suma "+a+"+"+b+"="+ (a+b));
}
}