hi

i am still trying to work out how to do this program i have had lots of help on here on this and for that i am so grateful i am finding java somewhat confusing to say the least but i am not going to give up.

scenario (just in case you don't know all ready.

A teacher has bought a packet of 40 sweets which she is going to share out between her class of 14 students.

Write a program to determine and output the number of sweets each child will receive. As a single sweet can not be shared between pupils, the program must calculate the number of sweets per child and the number that the teacher keeps for herself.

my code so far (with help on here and tutorials)

import java.until.*;

//determine the ouput of number of sweets per child

public class Sweets

{

public static void main (String args[])

{

//create Scanner to read in data

Scanner myKeyboard = new Scanner(System.in);

//prompt user for input – use print to leave cursor on line

System.out.print("Number of sweets ");

int sweets = myKeyboard.nextInt();

System.out.print(" pupil ");

int pupil = myKeyboard.nextInt();

System.out.print("Each pupil ");

int sweet/pupil = myKeyboard.nextInt();

System.out.print("Left for teacher ");

int sweet%pupil= myKeyboard.nextInt();

System.out.println("each pupil gets " + eachPupil +" sweets and " + leftForTeacher+ " sweets are left for teacher");

}

}

the 2 errors i am getting still.

H:\FPT>javac Sweets.java

Sweets.java:25: error: ';' expected

int sweet/pupil = myKeyboard.nextInt();

^

Sweets.java:29: error: ';' expected

int sweet%pupil= myKeyboard.nextInt();

^

2 errors

Many thanks..