标签:style code int 数组 return clu main tmp stdio.h
#include <stdio.h> int main(void) { int a[11] = {111,20,123,4543,556,34,5,54,43,234,53}; int i ; for(i=0;i<11;i++){ printf("%d\t",a[i]); } printf("\n"); for(i=0;i<=4;i++){ int tmp = a[i]; a[i]= a[10-i]; a[10-i] = tmp; } for(i=0;i<11;i++){ printf("%d\t",a[i]); } printf("\n"); int min=0; int max =10; while(min<max){ int tmp = a[min]; a[min] = a[max]; a[max] = tmp; min++; max--; } for(i=0;i<11;i++){ printf("%d\t",a[i]); } printf("\n"); return 0; }
标签:style code int 数组 return clu main tmp stdio.h
原文地址:http://www.cnblogs.com/dafume/p/6418540.html