Answer:
sorry its late
Explanation:
/*
* Write a program that guesses every possible 4 digit passcode
* combinations until the correct passcode is guessed.
*
* The passcode is randomly generated and stored in the variable
* secretPasscode.
*
* Print out how many guesses it took to guess the correct passcode.
*/
function start() {
var correctCode = generateRandomPasscode();
var b = 0;
while(true){
var guessCode = generateRandomPasscode();
b++;
if(isCorrect(guessCode, correctCode)){
println("The correct passcode was " + guessCode);
println("It took you " + b + " tries to guess it");
break;
}
}
}
function isCorrect(guessCode, correctCode) {
return guessCode == correctCode;
}
function generateRandomPasscode() {
var randomPasscode = "";
for(var i = 0; i < 4; i++) {
var randomDigit = Randomizer.nextInt(0, 9);
randomPasscode += randomDigit;
}
return randomPasscode;
}
Answer:
for (char i='a'; i<='e'; i++){
for (char j='a'; j<='e'; j++){
cout << i<< j<< "\n";
}
}
Explanation:
The loop runs all characters from the inner while the outer holds one character, by doing so, a will be matched with a,b,c,... Like wise b,c,d,... and on it goes.
Answer:
True
Explanation:
<em>IP Address</em>: It is used to uniquely identify each device over the network.
3D animation is best for developing characters and would showcase depth and realism.
Conversely, one would use 2D animation to create a flat appearance.