Skip to content

Instantly share code, notes, and snippets.

@creyn
Created August 25, 2018 14:05
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/3db76b77f331c19b745f9352c9dac965 to your computer and use it in GitHub Desktop.
Save creyn/3db76b77f331c19b745f9352c9dac965 to your computer and use it in GitHub Desktop.
Droga Programisty : Kod : Matematyka w Javie
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