关键就是hint里的提示
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int step,start,end;
scanf("start = %d, step = %d, end = %d",&start,&step,&end);
int n;
if(start<=step)
{
for(n=start;n<=end;n+=step)
{
printf("%d ",n);
}
}
else
{
for(n=start;n>=end;n+=step)
{
printf("%d ",n);
}
}
return 0;
}