-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.java
More file actions
30 lines (24 loc) · 899 Bytes
/
Copy pathmath.java
File metadata and controls
30 lines (24 loc) · 899 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
import java.util.*;
public class math {
public static void main(String args[]) {
// Scanner sc = new Scanner(System.in);
// System.out.println(Math.abs(-987));
// System.out.println(Math.floor(4.89));
// System.out.println(Math.ceil(4.87));
// System.out.println(Math.random());
// for(int i=0; i<=15; i++){
// int random = (int)Math.round(Math.random()*20);
// System.out.print(random + " ");
// }
String name = "virat";
int run = 90;
System.out.println("Hello " + name + " your score is: " + run);
System.out.printf("hello %s your score is: %d", name, run);
StringBuilder sb = new StringBuilder("First");
sb.append(name);
sb.append(run);
sb.append("kohli");
sb.append(18);
System.out.println(sb);
}
}