Computer Science, asked by kujurashit681, 17 days ago

program to accept name of user in a variable and display the same in output​

Answers

Answered by Unlikely
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