#include <stdio.h>
void main()
{
int num[10],i;
//输入该有序数列
for(i=0;i<10;i++)
scanf("%d",&num[i]);
int n,m,temp, *p,*q;
//从第n个数开始数m个数逆序
printf("Please input the start point and the num:");
scanf("%d%d",&n,&m);
//将其逆序交换
for(p=num+n-1,q=num+n+m-2;p<q;p++,q--)
{
temp=*p;
*p=*q;
*q=temp;
}
//输出
for(i=0;i<10;i++)
printf("%d\n",num[i]);
}
温馨提示:答案为网友推荐,仅供参考