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 Respostas
+ 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