package day3;
public class demo9 {
public static void main(String[] args) {
int people = 5;
int age1 = 10;
int b = demo9.day(people,age1);
System.out.println("第五个人是"+b+"岁!");
}
public static int day(int count,int age) {
for (int i = 2; i <= count; i++) {
age += 2;
}
return age;
}
}
输出结果:
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)