21天养成良好习惯-7
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a1,a2,n,d,y;
a1>=-100,a2<=100,0<n&&n<=1000;
scanf("%d %d %d",&a1,&a2,&n);
d=a2-a1,y=a1+(n-1)*d;
printf("%d",y);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
float x;
printf(“Input math1, English and math2:”);
scanf("%d,%d,%d",&a,&b,&c);
x=(a5+b1.5+c*3.5)/10;
printf(“Final score = %.2f\n”,x);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float a,c;
int b;
printf(“Input length and days:”);
scanf("%f,%d",&a,&b);
c=a*pow(0.5,b);
printf(“length=%.5f\n”,c);
return 0;
}