Guest User

Untitled

a guest
Nov 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package com.company;
  2.  
  3. public class java1task2 {
  4. public static void main(String[] args) {
  5. int a, b, c, d;
  6. a = 12;
  7. b = 10;
  8. c = 7;
  9. d = 5;
  10. System.out.println("f+g="+ istina(a,b));
  11. }
  12. public static int megacalculate ( int a, int b, int c, int d){
  13. return a * (b + (c / d));
  14. }public static boolean istina(int f,int g) {
  15. if (10 <= f + g && f + g <= 20) {
  16. return true;
  17. }
  18. else return false;
  19. }
  20. }
Add Comment
Please, Sign In to add comment