program to accept name of user in a variable and display the same in output
Answers
Answered by
1
Answer:
You did not specify what language but heres on java
Explanation:
import java.util.Scanner;
public class Name {
public static void main(String args[]) {
Scanner myObj = new Scanner(System.in); // Create a Scanner object
System.out.println("Enter name: ");
String userName = myObj.nextLine(); // Read user input
System.out.println(userName); // Output user input
}
}
Similar questions
Math,
8 days ago
Social Sciences,
8 days ago
Social Sciences,
17 days ago
Math,
17 days ago
Math,
9 months ago
Biology,
9 months ago
Math,
9 months ago