01f or(int i=0;i<TOTAL_TOSS;i++)
02 {
03 System.out.print("Toss number "+i+". Please enter h for heads, and t for tails: ");
04 toss=scan.nextInt();
05 if(toss==1)
06 {
07 HeadCount++;
08 }
09 else
10 {
11 TailsCount++;
12 }
13}
you can work with that