-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.java
More file actions
100 lines (94 loc) · 3.13 KB
/
example.java
File metadata and controls
100 lines (94 loc) · 3.13 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
public class example{
static String[] elec={"N/A","N/A","linear","trigonal planar","tetrahedral","trigonal bipyramidal","octahedral","pentagonal bipyramidal","square antiprismatic"};
public static String electronic(int a){
return(elec[a]);
}
public static String molecular(int a, int b){
if (a==1){
return("N/A");
}
if (a==2){
if(b==2){ return("linear");}
return("N/A");
}
if(a==3){
if(b==2){ return("bent");}
if(b==3){ return("trigonal planar");}
return("N/A");
}
if(a==4){
if(b==2){ return("bent");}
if(b==3){ return("trigonal pyramidal");}
if(b==4){ return("tetrahedral");}
return("N/A");
}
if(a==5){
if(b==2){ return("linear");}
if(b==3){ return("T-Shaped");}
if(b==4){ return("seesaw");}
if(b==5){ return("trigonal bipyramidal");}
return("N/A");
}
if(a==6){
if(b==4){ return("square planar");}
if(b==5){ return("square pyramidal");}
if(b==6){ return("octahedral");}
return("N/A");
}
if(a==7){
if(b==5){ return("pentagonal planar");}
if(b==6){ return("pentagonal pyramidal");}
if(b==7){ return("pentagonal bipyramidal");}
return("N/A");
}
if(a==8){
if(b==8){ return("square antiprismatic");}
return("N/A");
}
return("N/A");
}
public static String ex(int a, int b){
if (a==1){
return("H2, O2");
}
if (a==2){
if(b==2){ return("CO2");}
return("N/A");
}
if(a==3){
if(b==2){ return("SO2");}
if(b==3){ return("BF3");}
return("N/A");
}
if(a==4){
if(b==2){ return("H2O");}
if(b==3){ return("NH3");}
if(b==4){ return("CH4");}
return("N/A");
}
if(a==5){
if(b==2){ return("XeF2");}
if(b==3){ return("ClF3");}
if(b==4){ return("SF4");}
if(b==5){ return("PCl5");}
return("N/A");
}
if(a==6){
if(b==4){ return("XeF4");}
if(b==5){ return("BrF5");}
if(b==6){ return("SF6");}
return("N/A");
}
if(a==7){
if(b==5){ return("XeF5-");}
if(b==6){ return("XeOF5-");}
if(b==7){ return("IF7");}
return("N/A");
}
if(a==8){
if(b==8){ return("XeF8 -2");}
return("N/A");
}
return("N/A");
}
}