import java.util.*;
public class personInformation
{
public static void main(String args[])
{
Scanner p = new Scanner(System.in);
String name,add,gender;
int id,age;
System.out.println("Enter the name of person :");
name=p.nextLine();
System.out.println("Enter the gender of person :");
gender=p.nextLine();
System.out.println("Enter the age of person :");
age=p.nextInt();
System.out.println("Enter the id of person :");
id=p.nextInt();
p.nextLine();
System.out.println("Enter the address of person :");
add=p.nextLine();
System.out.printf("Your name is %s",name);
System.out.printf("\nYour age is %d",age);
System.out.printf("\nYour id is %d",id);
System.out.printf("\nYour gender is %s",gender);
System.out.printf("\nYour address is %s",add);
}}
0 comments:
Post a Comment