-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
29 lines (29 loc) · 1.05 KB
/
Copy pathMain.java
File metadata and controls
29 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.io.*;
class Main{
public static void main(String args[]){///Comentario
int resp = Lectura.readInt("Ingresa lo que quieres hacer \n1=Multi\2=Suma\3=Division");
while (resp !=3){
resp =Lectura.readInt("Ingresa lo que quieres hacer \n1=Multi\2=Suma");
switch (resp){
case 1:
multiplicacion(Lectura.readInt("Ingresa un numero"),Lectura.readInt("Ingresa otro numero") );
break;
case 2:
suma(Lectura.readInt("Ingresa un numero"),Lectura.readInt("Ingresa otro numero"));
break;
case 3:
division(Lectura.readInt("Ingresa un numero"),Lectura.readInt("Ingresa otro numero"));
break;
}
}
}
public static void multiplicacion(int x, int y){
System.out.println(x+" x "+y+" = "+(x*y));
}
public static void suma(int x, int y){
System.out.println(x+" + "+y+" = "+(x+y));
}
public static void division(int x, int y){
System.out.println(x+" / "+y+" = "+(x/y));
}
}