Write down a java program to display simple bio-data of students, which contain the fields: Roll, Name, Subject and Marks.
Answers
Answered by
0
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 help
Explanation:
Pls mark me as brainliest
Similar questions