-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdays.java
More file actions
43 lines (41 loc) · 866 Bytes
/
days.java
File metadata and controls
43 lines (41 loc) · 866 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
40
41
42
43
package com.botcoder;
import java.util.Scanner;
public class days {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int date = sc.nextInt();
int a = date%7;
if(date<31){
switch (a) {
case 1:
System.out.println("today is monday");
break;
case 2 :
System.out.println("today is tuesday");
break;
case 3 :
System.out.println("today is wednsday");
break;
case 4 :
System.out.println("today is thursday");
break;
case 5 :
System.out.println("today is friday");
break;
case 6 :
System.out.println("today is sutarday");
break;
case 0 :
System.out.println("today is sunday");
break;
default :
System.out.println("enter only date");
break;
}
}
else
{
System.out.println("enter only date");
}
}
}