package work010;
public class Dwork {
public static void main(String[] args) {
// TODO Auto-generated method stub
for (int i = 1; i < 100; i++) {
if (i % 2 == 0) {
System.out.println(i * i / 2);
}
else {
System.out.println((i * i - 1) / 2);
}
}
}
}
package work010;
public class Dwork1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
for (int a = 1; a < 100; a++)
{
for (int b = 0; b < a; b++) {
if (a * b == (a + b) * 6 && (a - b) <= 8) {
System.out.println("年龄较小者是" + b + "岁");}
}
}
}
}
package work010;
public class Dwork3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String str = "ABC_001";
if (str.indexOf("ABC") != -1) {
System.out.println("包含");
} else {
System.out.println("不包含");
}
}
}