Skip to content

Instantly share code, notes, and snippets.

@creyn
Created August 25, 2018 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save creyn/dc514488f7040028af0d35f944c0eb44 to your computer and use it in GitHub Desktop.
Save creyn/dc514488f7040028af0d35f944c0eb44 to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Matematyka w Javie 2
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