将数组xx的前k个元素,变为后k个元素,数组的这两段中的元素顺序不变.我怎么调都有错误啊...#include "stdio.h"#include "conio.h"main(){\x05clrscr();\x05int n,k,xx[20];\x05int i,j,t;\x05printf("\n Please enter a number:");

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/12 17:14:54
将数组xx的前k个元素,变为后k个元素,数组的这两段中的元素顺序不变.我怎么调都有错误啊...#include"stdio.h"#include"conio.h"main(){\x05clrscr()

将数组xx的前k个元素,变为后k个元素,数组的这两段中的元素顺序不变.我怎么调都有错误啊...#include "stdio.h"#include "conio.h"main(){\x05clrscr();\x05int n,k,xx[20];\x05int i,j,t;\x05printf("\n Please enter a number:");
将数组xx的前k个元素,变为后k个元素,数组的这两段中的元素顺序不变.我怎么调都有错误啊...
#include "stdio.h"
#include "conio.h"
main()
{
\x05clrscr();
\x05int n,k,xx[20];
\x05int i,j,t;
\x05printf("\n Please enter a number:");
\x05scanf("%d",&n);
\x05printf("\n Please enter %d numbers:",n);
for(i=0;i

将数组xx的前k个元素,变为后k个元素,数组的这两段中的元素顺序不变.我怎么调都有错误啊...#include "stdio.h"#include "conio.h"main(){\x05clrscr();\x05int n,k,xx[20];\x05int i,j,t;\x05printf("\n Please enter a number:");
第一空: t=a[0]
第二空: xx[t-1]=xx[t]
第三空: xx[n-1]=t;