How to make a program, such that u that is the viewer of my code is asked to place an input. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

How to make a program, such that u that is the viewer of my code is asked to place an input.

like the code of capitalize each letter.

2nd Dec 2017, 1:22 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar
11 Answers
+ 2
Well what language do you want it in?
2nd Dec 2017, 1:47 PM
Ahri Fox
Ahri Fox - avatar
+ 1
import java.util.Scanner; Scanner scan = new Scanner(System.in); String getWord = scan.nextLine();
2nd Dec 2017, 2:03 PM
LordHill
LordHill - avatar
+ 1
change the input type String name = scan.nextLine(); int number = scan.nextInt(); notice instead of nextLine() I use nextInt()
2nd Dec 2017, 4:11 PM
LordHill
LordHill - avatar
0
thank u so much
3rd Dec 2017, 3:59 AM
Anjali Kushwaha
Anjali  Kushwaha - avatar
0
it's what we are here for
3rd Dec 2017, 2:05 PM
LordHill
LordHill - avatar
- 1
I tried but when writes it in solo learn it won't work. Please help me out
2nd Dec 2017, 2:24 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar
- 1
can u show me an example code.. please. That would a great help
2nd Dec 2017, 2:24 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar
- 1
iin java
2nd Dec 2017, 2:25 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar
- 1
thank u for the code
2nd Dec 2017, 3:30 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar
- 1
but I need one more help. what if I want to input a number.. or anything else
2nd Dec 2017, 3:31 PM
Anjali Kushwaha
Anjali  Kushwaha - avatar