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);

31st Aug 2021, 8:17 PM
Robert Hinojosa
Robert Hinojosa - avatar
5 Respostas
+ 1
In string you have assigned nothing and u not taking any inputs without any input how it can print
1st Sep 2021, 3:29 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
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
1st Sep 2021, 3:42 AM
Robert Hinojosa
Robert Hinojosa - avatar
0
How division of two string is possible 😆🙃
1st Sep 2021, 3:50 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Right haha so how do i get it to divide ? Or how do i get it to work ?
1st Sep 2021, 4:02 AM
Robert Hinojosa
Robert Hinojosa - avatar
0
I tried to turn it to int from string
1st Sep 2021, 4:03 AM
Robert Hinojosa
Robert Hinojosa - avatar