-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPractice04_Conditions.java
More file actions
114 lines (103 loc) · 2.99 KB
/
Practice04_Conditions.java
File metadata and controls
114 lines (103 loc) · 2.99 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package com.company;
import java.util.Scanner;
public class Practice04_Conditions {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 1.
// System.out.println("Marks in Physics out of 100");
// int phy = sc.nextInt();
//
// System.out.println("Marks in Maths out of 100");
// int mat = sc.nextInt();
//
// System.out.println("Marks in Chem out of 100");
// int chem = sc.nextInt();
//
// int per = (phy + mat + chem) / 3;
//
// if (phy<33) {
// System.out.println("Fail");
// }
// else if (mat<33) {
// System.out.println("Fail");
// }
// else if (chem<33) {
// System.out.println("Fail");
// }
// else if (per<40) {
// System.out.println("Fail");
// }
// else {
// System.out.println("Pass");
// }
// 2.
// System.out.println("Enter Your Income in ");
// float inc = sc.nextFloat();
// System.out.println("You need to pay tax");
//
//
// if (inc>250000 && inc<500000) {
// float a = inc * 0.05f;
// System.out.println(a);
// }
// if (inc>500000 && inc<1000000) {
// float a = inc * 0.2f;
// System.out.println(a);
// }
// if (inc>1000000) {
// float a = inc * 0.03f;
// System.out.println(a);
// }
// 3.
// System.out.println("Enter Day Number to find out");
// byte a = sc.nextByte();
// if (a<1 && a>7){
// System.out.println("Enter The Value under 1 to 7");
// }
// switch (a){
// case 1:
// System.out.println("Monday");
// break;
// case 2:
// System.out.println("Tuesday");
// break;
// case 3:
// System.out.println("Wednesday");
// break;
// case 4:
// System.out.println("Thursday");
// break;
// case 5:
// System.out.println("Friday");
// break;
// case 6:
// System.out.println("Saturday");
// break;
// case 7:
// System.out.println("Sunday");
// default:
// System.out.println("Enter the Value under 1 to 7");
// 4.
// System.out.println("Enter year");
// int a = sc.nextInt();
// int b = a / 4;
// int c = b*4;
//
// if (a==c){
// System.out.println("Leap Year");
// }
// else {
// System.out.println("Its Not a Leap Year");
// }
//
// 5.
System.out.println("Enter Website");
String a = sc.next();
if (a.endsWith("com")) {
System.out.println("Commercial website");
}
else if (a.endsWith("org")) {
System.out.println("Organisational website");
}
}
}