Thanks guys. I figured out my problem just by editing my code. My problem was the first printf line. I didnt assign the f inside the () as I did in the following output lines, so I just simply had to change the first one to println in that format. So the working code for this is as follows. Thanks again for your help
public class diceroll
{
/**
*
*/
public static void main(String[] args)
{
int toRoll = 600, x,i=0, c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0,
c6 = 0, sum1;
double pct1, pct2, pct3, pct4, pct5, pct6, sum2;
for (i=0;i<toRoll; i++)
{
x = (int)(Math.random()*6)+1;
if (x==1)
c1++;
else if (x==2)
c2++;
else if (x==3)
c3++;
else if (x==4)
c4++;
else if (x==5)
c5++;
else if (x==6)
c6++;
}
pct1 = (c1 * 100.0) / (double)toRoll;
pct2 = (c2 * 100.0) / (double)toRoll;
pct3 = (c3 * 100.0) / (double)toRoll;
pct4 = (c4 * 100.0) / (double)toRoll;
pct5 = (c5 * 100.0) / (double)toRoll;
pct6 = (c6 * 100.0) / (double)toRoll;
sum1= c1+c2+c3+c4+c5+c6;
sum2= pct1+pct2+pct3+pct4+pct5+pct6;
System.out.println("Face\tFrequency\t%");
System.out.printf("---------------------------\n");
System.out.printf("1\t%d\t%10.1f\n", c1, pct1);
System.out.printf("2\t%d\t%10.1f\n", c2, pct2);
System.out.printf("3\t%d\t%10.1f\n", c3, pct3);
System.out.printf("4\t%d\t%10.1f\n", c4, pct4);
System.out.printf("5\t%d\t%10.1f\n", c5, pct5);
System.out.printf("6\t%d\t%10.1f\n", c6, pct6);
System.out.printf("---------------------------\n");
System.out.printf("Total:\t%d\t%10.1f\n", sum1, sum2);
}
}