0
Please help, what am I doing wrong ?
import java.until.scanner; public class (inserted) { public static void main(String[] args) { String pizzaPurchased = “”; String pizzaSlices = “”; String adultsHungry = “”; String childrenHungry = “”; int remainingSlices = 0; Scanner scan = new Scanner(System.in); (Code in between done) Int remainingSlices = pizzasSlice % (adultsHungry + childrenHungry); System.out.println(“slices per person: “ + remainingSlices);
5 ответов
+ 1
In string you have assigned nothing and u not taking any inputs without any input how it can print
0
When i hit “run” code it tells the reader to enter the input and it then creates the output by responding back with what they entered what im really trying to verify is the bottom “int” part .
System.out.println(“how many pizzas were purchased: “);
pizzasPurchased = scan.nextLine();
System.out.println(whole pizzas available are: “ + pizzasPuchased);
And so forth..
The reader will enter a number and it will print back the number
0
How division of two string is possible 😆🙃
0
Right haha so how do i get it to divide ? Or how do i get it to work ?
0
I tried to turn it to int from string