-4 Write a Java program to
print youe name, class,
Roll-no ,Marks and age.
Answers
Answered by
0
Answer:
Explanation:
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);
Similar questions