0

How to do the coding for this output?

You have successfully captured 10 pokemons Pikachu:4 Zubat:2 Eevee:2 Flamingo:2

26th Mar 2022, 4:56 AM
CML
CML - avatar
15 Respuestas
+ 4
Just captured 10 pokemons? Where is complete question?
26th Mar 2022, 4:58 AM
A͢J
A͢J - avatar
+ 2
What are inputs? How to identify which character is captured how many times?
26th Mar 2022, 5:22 AM
A͢J
A͢J - avatar
+ 1
Given 20 pokeballs and you are successfully captured 10 pokemons. How many pokemon you had captured for each different character? Sample out: Pikachu:4 Zubat:2 Eevee:2 Flamingo:2
26th Mar 2022, 5:10 AM
CML
CML - avatar
+ 1
CML I entered my name age yes enter then hit submit all 4 types of Pokemon displayed but it stated 0 captured
26th Mar 2022, 6:14 AM
BroFar
BroFar - avatar
26th Mar 2022, 9:13 AM
CtREL0K
CtREL0K - avatar
+ 1
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("enter the number of total "); int pokemon = sc.nextInt(); System.out.println("Enter the name of pikacku and how many captured"); System.out.println("Enter the name of pikacku and how many captured"); int pika1 = sc.nextInt() System.out.println("Enter the name of pikacku and how many captured"); int pika2 = sc.nextInt() System.out.println("Enter the name of pikacku and how many captured"); int pika3 = sc.nextInt() int pika4 = pika1+pika2+pika3 System.out.println(pika1+\n +pika2+ \n+pika3 ) } }
27th Mar 2022, 4:40 AM
Shourya Pandey
Shourya Pandey - avatar
0
Why the total captured keep on zero when i run the programme?
26th Mar 2022, 9:15 AM
CML
CML - avatar
0
I don't know
26th Mar 2022, 9:16 AM
CtREL0K
CtREL0K - avatar
0
Send me a message and we'll discuss everything there.
26th Mar 2022, 9:17 AM
CtREL0K
CtREL0K - avatar
0
It seems to be the same program as here: https://www.sololearn.com/Discuss/3006752/?ref=app I gave you an example in the other thread. How you need format the output depends on how you stored your data.
26th Mar 2022, 11:52 AM
Lisa
Lisa - avatar
0
1.provide player the number of object(such as pokeball) 2.spawn the characters randomly(minimum 5 characters) 3.set the encounter rate and capture rate randomly(the result will be different every time the program run) 4.able to calculate and display the total number of characters captured 5 able to display the number of captured for every single character
26th Mar 2022, 1:32 PM
CML
CML - avatar
0
print(“””You have successfully captured 10 pokemons Pikachu:4 Zubat:2 Eevee:2 Flamingo:2”””) I think this might be a simple print statement.
27th Mar 2022, 1:57 AM
Oliver Rafanan
0
This is java bye the way
27th Mar 2022, 4:53 AM
Shourya Pandey
Shourya Pandey - avatar
0
Print ("You have successfully captured 10 pokemons Pikachu:4 Zubat:2 Eevee:2 Flamingo:2")
27th Mar 2022, 11:35 AM
Power Gamer
Power Gamer - avatar