forked from levertyk/Java-to-Python-Transcoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest1.java
More file actions
28 lines (20 loc) · 646 Bytes
/
Test1.java
File metadata and controls
28 lines (20 loc) · 646 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
import java.util.Scanner;
public class Test1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int bigNumbers = 0;
System.out.println("Hello world!");
System.out.println("Please enter a number:");
int input = sc.nextInt();
String output = "\n\n";
for(int i = 0; i < input; i++) {
output += i + " x 4 = " + i*4 + "\n";
if(i > 5) {
bigNumbers += 1;
}
}
System.out.println(output);
System.out.println("There were " + bigNumbers + " big numbers!");
sc.close();
}
}