Skip to content

Commit d12e6e1

Browse files
Add files via upload
added
1 parent 9becfcb commit d12e6e1

File tree

6 files changed

+39
-0
lines changed

6 files changed

+39
-0
lines changed

Variables-3/Data_Input.class

1.26 KB
Binary file not shown.

Variables-3/Data_Input.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.util.Scanner;
2+
3+
public class Data_Input {
4+
public static void main(String[] args) {
5+
Scanner sc = new Scanner(System.in);
6+
7+
System.out.println("Enter your age:");
8+
int age = sc.nextInt();
9+
sc.nextLine(); // Consume the newline character
10+
11+
System.out.println("Enter your name:");
12+
String name = sc.nextLine();
13+
14+
System.out.println("Do you have a girlfriend? (true/false)");
15+
boolean gf = sc.nextBoolean();
16+
17+
System.out.println("Name of Student: "+name+"\n Age is: "+age+"\n and GirlFriend is: "+gf);
18+
}
19+
}

Variables-3/Data_Types.class

412 Bytes
Binary file not shown.

Variables-3/Data_Types.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Data_Types {
2+
public static void main(String[] args) {
3+
4+
int a = 10, b = 20;
5+
int ans = a*b/a-b;
6+
System.out.println(ans);
7+
}
8+
}
9+
10+
//left----------------------->rigth

Variables-3/Hi.class

475 Bytes
Binary file not shown.

Variables-3/Hi.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Hi {
2+
public static void main(String[] args) {
3+
System.out.println("Hello Google");
4+
System.out.print("Come to SDE Summer internship");
5+
}
6+
}
7+
/*
8+
* Hello Google
9+
Come to SDE Summer internship
10+
*/

0 commit comments

Comments
 (0)