Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication1;
- import java.io.IOException;
- public class JavaApplication1 {
- public static int mayor(int x, int y, int z) {//parametro formal, LA FIRMA
- if (x > y && x > z) {
- return x;
- }
- if (y > x && y > z) {
- return y;
- } else {
- return z;
- }
- }
- static public int azar(int x, int y) {
- return x + (int) (Math.random() * (y - x + 1));
- }
- public static void main(String[] args) throws IOException {
- int opUsuario = U.readInt("ingrese su opcion (1) Tijera , (2) papel , (3) piedra; ");
- int opComputador = azar(1, 3);
- U.println("usuario jugo : " + opUsuario);
- U.println("el computador juego :" + opComputador);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement