class Demo1
{
public static void main(String[] args)
{
System.out.println("第一个月的销量为:1");
System.out.println("第二个月的销量为:1");
int soat1=1,soat2=1,mouth=24,temp;
for(int i=3;i<=mouth;i++){
temp=soat2;
soat2=soat1;
soat1=temp+soat2;
System.out.println("all="+soat1);
}
}
{
public static void main(String[] args)
{
System.out.println("第一个月的销量为:1");
System.out.println("第二个月的销量为:1");
int soat1=1,soat2=1,mouth=24,temp;
for(int i=3;i<=mouth;i++){
temp=soat2;
soat2=soat1;
soat1=temp+soat2;
System.out.println("all="+soat1);
}
}
}