forked from zmbaldwin/My-Programs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSchedule.java
More file actions
35 lines (34 loc) · 924 Bytes
/
Schedule.java
File metadata and controls
35 lines (34 loc) · 924 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
import java.util.Scanner;
public class Schedule
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String name;
System.out.println("Enter your name: ");
name = scan.nextLine();
int numCourses = 0;
System.out.println("Enter the number of courses you are enrolled in: ");
numCourses = scan.nextInt();
scan.nextLine();
String course;
boolean CSCI = false;
for (int i = 0; i < numCourses; i++)
{
System.out.println("Enter a course: ");
course = scan.nextLine();
if (course.equalsIgnoreCase("CSCI 1302"))
{
CSCI = true;
}
}
if (CSCI = true)
{
System.out.println("Good Luck!");
}
else if (CSCI = false)
{
System.out.println("You are missing out!");
}
}
}