write a program to print your name age and address
GalaxyBoy15:
what programming language you want to?
Answers
Answered by
3
import java.util.*;
class a {
public static void main(String args []) {
int n,a,ad;
Scanner in = new Scanner(System.in);
System.out.println(" Your name : ");
n = in.nextInt();
System.out.println(" Your age : ");
a = in.nextInt();
System.out.println(" Your address : ");
ad = in.nextInt();
System.out.println(" Your name is : " +n );
System.out.println(" Your age is : " +a );
System.out.println(" Your address is : " +ad);
}
}
Output:
Your name :
a
Your age :
13
Your address :
abcd
Your name is a
Your age is 13
Your address is abcd
Here, a,13,abcd,it should be written by you.
Friends it is used for taking input.
Ok!
Thanks for asking me.
class a {
public static void main(String args []) {
int n,a,ad;
Scanner in = new Scanner(System.in);
System.out.println(" Your name : ");
n = in.nextInt();
System.out.println(" Your age : ");
a = in.nextInt();
System.out.println(" Your address : ");
ad = in.nextInt();
System.out.println(" Your name is : " +n );
System.out.println(" Your age is : " +a );
System.out.println(" Your address is : " +ad);
}
}
Output:
Your name :
a
Your age :
13
Your address :
abcd
Your name is a
Your age is 13
Your address is abcd
Here, a,13,abcd,it should be written by you.
Friends it is used for taking input.
Ok!
Thanks for asking me.
Similar questions