+ 1
Please can someone explain user input I'm a novice with programming language
5 ответов
+ 2
User input means input provided by the user who is using the program or software.
For example if you want to create a program that stores data related to user then the data provided by user is more reliable than entered randomly.
So in that case you will need to use user input in program.
User input can be entered as follow:
In Python,
name = input("Enter your Name")
print(name)
in C,
char name[20];
scanf("%s",&name);
printf("%s",name)
in Java,
Scanner input = new Scanner(System.in):
String name = input.nextLine();
System.out.println(name)
+ 1
The input function returns a string, including the input the user gave. It has 1 argument, and it prints it on the screen. Example:
inp = input("Enter something: ")
print(inp)
# input is: this is an input
# output:
# Enter something: this is an input
+ 1
What about a case where you specify what language you want the answer in
+ 1
Ijale using scanner :
https://www.sololearn.com/learn/Java/2220/?ref=app
and please add relevant tags while posting
edit :
https://www.sololearn.com/Discuss/1316935/?ref=app
0
What about a case where scanner is used