题目内容
运行以下程序,输入1 4 3 0 2,写出程序运行结果。#include void ReadData(int a[], int n);void PrintData(int a[], int n);void fun(int a[], int n);void Swap(int *x, int *y);int main(){int a[5];ReadData(a, 5);fun(a, 5);PrintData(a, 5);return 0;}void ReadData(int a[], int n){int i;for (i=0; i x){x = a[i];xPos = i;}if (a[i] < y){y = a[i];yPos = i;}}temp = a[xPos];a[xPos] = a[yPos];a[yPos] = temp;}void Swap(int *x, int *y){int temp;temp = *x;*x = *y;*y = temp;}
查看答案
搜索结果不匹配?点我反馈
更多问题