45 CHALLENGE 2

 Print out a second score on the screen with the following 
the score set to 10000
levelCompleted set to 8
bonus set to 200 

soln:
package com.cnc;
public class Main<gameOver> {
public static void main(String[] args) {

boolean gameOver = true;
int score = 10000;
int levelCompleted = 8;
int bonus = 200;
if(gameOver){
int finalScore = score +(levelCompleted*bonus);
System.out.println("your final score is "+finalScore);
}
}
}

Popular posts from this blog

NUMBER PALINDROME CHALLENGE

ENCAPSULATION CHALLENGE

USER INPUT PRINT ORIGINAL,REVERSE ARRAY AND SORTED ARRAY