Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. package pisemka;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Pisemka {
  6.  
  7. /**
  8. * @param args the command line arguments
  9. */
  10. public static void main(String[] args) {
  11. Scanner sc = new Scanner(System.in, "utf-8");
  12.  
  13. System.out.print("pocet kusu ");
  14. int kusy = sc.nextInt();
  15. System.out.print("celkovoa cena ");
  16. int cena = sc.nextInt();
  17. CenaZaKus(kusy, cena);
  18. }
  19.  
  20. static void CenaZaKus(int kusy, int cena) {
  21. System.out.println("Cena kusu je: " + (float) cena / kusy);
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement