Computer Science, asked by sumpusingh, 1 year ago

write a program to print your name age and address


GalaxyBoy15: what programming language you want to?
sumpusingh: main method

Answers

Answered by Ujjwwl
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.

sumpusingh: i want in main method
Similar questions