-
-
Save creyn/3db76b77f331c19b745f9352c9dac965 to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Matematyka w Javie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Matematyka { | |
public static void main(String args[]) { | |
System.out.println("Operacje matematyczne\n"); | |
int liczbaA = 7; | |
int liczbaB = 14; | |
int suma = liczbaA + liczbaB; | |
int roznica = liczbaA - liczbaB; | |
int iloczyn = liczbaA * liczbaB; | |
int iloraz = liczbaA / liczbaB; | |
int reszta = liczbaA % liczbaB; | |
System.out.println("Suma to: " + suma); | |
System.out.println("Roznica to: " + roznica); | |
System.out.println("Iloczyn to: " + iloczyn); | |
System.out.println("Iloraz to: " + iloraz); | |
System.out.println("Reszta z dzielenia to: " + reszta); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment