Sunday, February 21, 2010

How To Unblock Skystar 2

java java Exercise Exercise Exercise java

us the following question, a istyor to do the calculation process. For example, the keyboard + girlince collection - entered removing / FURNITURE ETC * entered entered bump process wants to do. Calcolatrice in grado di eseguire una

Realizzare

somme, sottrazioni, moltiplicazioni e Divisione real tra Numer.

Esempio of performance:

first operand?

23.5

According working?
Operator (+,-,*,/)?

+

Score: 36.2

---------------------------------- public class Calculator {

public static void main (String [] args) {

/ * ve birinci sayiyi girip okuyoruz * /

Console.scriviStringa (First working? ");

Console.leggiReale double op1 = ();

/ * ve ikinci sayiyi girip okuyoruz * /

Console.scriviStringa ("Second operando? ");

Console.leggiReale double op2 = ();

/ * Processing of the operator to enter and okutuyoruz * /

Console.scriviStringa (" Operator (+,-,*,/)?");

char

Console.leggiCarattere the operator = ();

double risul;

/ * below the switch, making the cycle of operations in accordance with the character entered using the keyboard, the character is different from saying the wrong characters are closing the program * /

switch (the operator) {

case '+':

risul = OP1 + op2;

break;

case '-': result =

op1 - op2;

break;

case '*': result =

op1 * op2;

break;

case '/':

results = op1 / op2;

break;

default:

Console.scriviStringa ("Incorrect Operator");

return;}

Console.scriviStr ("Result:");

Console.scriviReale (result);}

}

----------------------------------

0 comments:

Post a Comment