Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by Javier ( 15 years ago )
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(
new InputStreamReader(System.in));
System.out.println();
System.out.print("ingrese la operacion ");
String operacion = in.readLine();
String pa = "(";
String pc = ")";
String ciclo;
int resultado = 0;
int ciclo1;
double a = 0.0;
double b = 0.0;
double suma = 0.0;
do{
if(operacion.equals(pa)){
int op = Integer.parseInt(operacion);
switch(op){
case '+' :
resultado = (int) (a+b);
resultado = (int) (b+a);
break;
case '-' :
resultado = (int) (a-b);
resultado = (int) (b-a);
break;
case '*' :
resultado = (int) (a*b);
resultado = (int) (b*a);
break;
case '/' :
resultado = (int) (a/b);
resultado = (int) (b/a);
break;
}
System.out.print("el resultado es " + resultado);
System.out.print("¿Desea salir? Si (1) No (2)");
String ciclo = in.readLine();
int ciclo1 = Integer.parseInt(ciclo);
while (ciclo1 = 2)
}
// TODO code application logic here
}
}
Revise this Paste
Parent: 32981