-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
41 lines (21 loc) · 753 Bytes
/
Main.java
File metadata and controls
41 lines (21 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args){
Scanner obj = new Scanner(System.in);
String name;
int rollno;
float marks;
System.out.println("Enter your name");
name = obj.nextLine();
System.out.println("Enter your rollno");
rollno = obj.nextInt();
System.out.println("Enter your marks");
marks = obj.nextFloat();
System.out.println("Name: " + name);
System.out.println("Rollno: " + rollno);
System.out.println("Marks: " + marks);
}
}