Professional Documents
Culture Documents
INSTRUCTIONS:
Create a program that will determine if the user guesses the correct number generated randomly by the
system or not. You also need to draw a system Flowchart and the Pseudocode of this program.
FLOWCHART:
QUEZON CITY UNIVERSITY
COLLEGE OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY
PSEUDOCODE:
.
package example;
import java.util.Scanner;
// Given K trials
int K = 5;
int i, guess;
System.out.println(
"A number is chosen"
+ " between 1 to 100."
+ "Guess the number"
QUEZON CITY UNIVERSITY
COLLEGE OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY
System.out.println(
"Guess the number:");
if (i == K) {
System.out.println(
"You have guess"
+ " correct number.");
System.out.println(
"The number was " + number);
}
}
// Driver Code
public static void
main(String arg[])
{
// Function Call
guessingNumberGame();
}
}