Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.String;
- public class Main {
- //Sa se creze o functie care verifica care nr este mai mare. Si sa afiseze nr cel mai mare
- //
- //ex: nr1 = 2, nr2 = 3
- static void myMethod(int x, int y) {
- if( x > y )
- {
- System.out.println("x este mai mare");
- }
- else
- {
- System.out.println("y este mai mare");
- }
- }
- public static void main(String[] args) {
- int nr1 = 2, nr2 = 1;
- System.out.println(myMethod(nr1,nr2));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement