create a java program that accepts a name,address and year of birth and then outputs the following;
enter your name; ada lovelace
enter your address; manila,philippines
enter your birthyear;1991
example output:
greetings ada lovelace,27 years old,from manila,philippines!
welcome to java programming
Answers
Answered by
3
Answer:
public class Brainly {
public static void main(String[]args){
String nam;
int brith;
String add;
Scanner scan=new Scanner(System.in);
System.out.println("Enter your name:" );
nam=scan.nextLine();
System.out.println("Enter your age:" );
brith=scan.nextInt();
System.out.println("Enter your address:" );
add=scan.nextLine();
System.out.println( "Greetings " + nam + " , " + brith + " years old, from" + add + ".");
}
}
Explanation:
Similar questions