-
-
Save creyn/dc514488f7040028af0d35f944c0eb44 to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Matematyka w Javie 2
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"); | |
float liczbaA = 7; | |
float liczbaB = 14; | |
float suma = liczbaA + liczbaB; | |
float roznica = liczbaA - liczbaB; | |
float iloczyn = liczbaA * liczbaB; | |
float iloraz = liczbaA / liczbaB; | |
float 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