Write a JAVA program to print your Name, Class, Roll .no and School
Answers
Answered by
81
Answer:
Java Program:
import java.util.*;
class MyProfile
{
public void main()
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter your name");
String n=sc.next();
System.out.println("Enter your class");
int c=sc.nextInt();
System.out.println("Enter your marks");
int m=sc.nextInt();
System.out.println("Enter your roll number");
int rn=sc.nextInt();
System.out.println("Name :"+n);
System.out.println("Class "+c);
System.out.println("Roll number "+rn);
System.out.println("Marks "+m);
}
}
---------------------------------------------------------------Hope it helps !
Explanation:
Answered by
45
Answer:
This image contain the correct Answer for this question
Attachments:
Similar questions
English,
5 months ago
English,
5 months ago
Geography,
5 months ago
Math,
10 months ago
Math,
10 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago