Beruflich Dokumente
Kultur Dokumente
*;
new java.util.Timer().schedule(
new java.util.TimerTask() {
@Override
},
2500
);
int i =0;
do{
String convert;
String area;
String stop;
if(enter.equals("area")){
int a=0;
do{
System.out.println(" okay " + name + " area of what shape do you want
to calculate (for now i can only calculate 4 areas) ");
String triangle;
String square;
String circle;
String rectangle;
if (AREA.equals("triangle")){
else if (AREA.equals("square")){
else if (AREA.equals("circle")){
double radius;
double areab;
radius = input.nextDouble();
System.out.print( " the area of this circle (of radius = " + radius
+ " ) is : " + areab);}
else if (AREA.equals("rectangle")){
else {
System.out.println( " sorry, we can't calculate " + AREA + " not yet ..." );}
System.out.println(" do you want to calculate area of any thing else ? " );
String y;
String n;
if(chiocea.equals("n")){break;}
else if(chiocea.equals("y")){continue;}
a++;
}while(a<100);
else if(enter.equals("convert")){
int b=0;
do{
System.out.println( " okay " + name + " type decimal to convert to decimal and
type binary to convert to binary and type HEX to convert to hexadecimal");
String decimal;
String binary;
String HEX;
if(CONVERT.equals("decimal")){
else if (CONVERT.equals("binary")){
while (num != 0)
{
int d = num % 2;
stack.push(d);
num /= 2;
}
while (!(stack.isEmpty() ))
{
System.out.print(stack.pop());
}
System.out.println(); }
int rem;
String str2="";
char hex[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
while(num>0)
{
rem=num%16;
str2=hex[rem]+str2;
num=num/16;
}
else {
System.out.println( " sorry, we can't convert " + CONVERT);}
String Y;
String N;
if(chioceb.equals("N")){break;}
else if(chioceb.equals("Y")){continue;}
b++;
}while(b<100);
else if(enter.equals("stop")){
break;}
String yes;
String no;
if(chiocec.equals("no")){
break;}
else if(chiocec.equals("yes")){continue;}
else {System.out.print(" sorry we said yes or no no " + chiocec );}
i++;
}while(i<100);