- Messages
- 221
- Reaction score
- 1
- Points
- 28
Pa help naman kung paano mag repeat ng program.
Need ko kasi ipasa mamaya. And wala talaga ako Idea or mahanap sa google.
Hope matulungan nyo ako.
Eto po yung Output nya.
View attachment 320528
Kailangan ko kasi I repeat yung Quiz Without Process Complete.
Salamat talaga sa tulong nyo.
Need ko kasi ipasa mamaya. And wala talaga ako Idea or mahanap sa google.
Hope matulungan nyo ako.
Code:
import java.util.Scanner;
public class Hello {
public static void main(String[] args) {
System.out.println ("Welcome To A Quiz Game\n");
int c =0;
Scanner scan = new Scanner (System.in);
System.out.println ("Who is the Philippine Hero?" );
System.out.println ("A. Andres Bonifacio");
System.out.println ("B. Lapu Lapu");
System.out.println ("C. Jose Rizal");
System.out.println ("D. Apolinario Mabini");
String in;
System.out.print("Input your Answer Here:");
in = scan.nextLine();
if (in.equals("C"))
{
do
{
System.out.println ("Correct\n");
c--;
System.out.print ("Do you want to Repeat the Quiz?: ");
}
while (c>1);
}
else
{
System.out.println ("Wrong\n");
}
}
}
View attachment 320528
Kailangan ko kasi I repeat yung Quiz Without Process Complete.
Salamat talaga sa tulong nyo.