/*manimbo_mp5*/
import java.io.*;
public class manimbo_mp5{
public static void main (String[]args) throws IOException{
BufferedReader br=new BufferedReader (new InputStreamReader (System.in));
Integer x=8,y=1,heads=0,tails=0;
String ht="";
while (x>0){
System.out.print ("Enter toss #" + y + " result: ");
ht=br.readLine();
if (ht=="h"){
heads++;
}
else if (ht=="t"){
tails++;
}
x--;
y++;
System.out.println ("Tails: " + tails);
System.out.println ("Heads: " + heads);
System.out.println ("ht is " + ht);
}
}
}
aladar04 0 Light Poster
aladar04 0 Light Poster
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
aladar04 0 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.