Answers for "user input"

2

how to get user input in java

import java.util.*;  
class UserInputDemo   
{  
public static void main(String[] args)  
{  
Scanner sc= new Scanner(System.in);    //System.in is a standard input stream  
System.out.print("Enter first number- ");  
int a= sc.nextInt();  
System.out.print("Enter second number- ");  
int b= sc.nextInt();  
System.out.print("Enter third number- ");  
int c= sc.nextInt();  
int d=a+b+c;  
System.out.println("Total= " +d);  
}  
}  
Posted by: Guest on December-09-2020
0

how to take input from user in html

<form>
  
  <!-- We can have various types of inputs like: Email, Plain Text, Date etc. -->
  <input type="email" name="user_email" placeholder="Your Email">
  <input type="text" name="user_description" placeholder="Your Description">
  <input type="date" name="current_date" placeholder="Current Date">
  
</form>
Posted by: Guest on May-26-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language