Code KBC
Code KBC
import java.util.Scanner;
System.out.println("\n------------WELCOME TO KBC------------\n");
if (Integer.toString(ans).equals(q[q.length - 1])) {
System.out.println("(•ᴗ•) Correct answer, You won " + price[index]);
score++;
if (index == 4) {
amount = 10000;
} else if (index == 9) {
amount = 320000;
} else if (index == 14) {
amount = 10000000;
}
} else {
System.out.println("( •̯́ ₃ •̯́) Wrong answer");
break;
}
}
System.out.println("\n ≽^•⩊•^≼ Your Winning Amount is " + amount + " and your score is " +
Math.round(((double) score / 15) * 100) + " out of 100");
scanner.close();
}
}
OUTPUT: