已知C源程序如下: include include void reverse(char S[]){ int C,i,J; f

17 查阅

已知C源程序如下:

include<stdio. h>

include<string. h>

void reverse(char S[]){

int C,i,J;

for(i=0,j=strlen(s)-1;i<j;i++,j++){

c=s[i];

s[i]=s[j];

s[j]=c;

}

}

void getHex(int number,char s[]){

int I;

i=0;

while(number>0){

if(number%16<10)

s[i++]=number%16+'0';

else

switch(number%16){

case 10:s[i++]='A';break;

case 11:s[i++]='B';break;

case 12:s[i++]='C';break;

case 13:s[i++]='D';break;

case 14:s[i++]='E';break;

case 15:s[i++]='F';break;

default:printf("Error");break;

}

number/=16;

}

s[i]:'\o';

reverse(s);

}

int main(){

unsigned int number;

int i=0:

char s[50];

printf("%s","please input number;\n");

scanf("%d",&number):

getHex(number,s);

i=0;

while(s[i])

printf("%c",s[i++]);

return 0;

}

画出程序中所有函数的控制流程图。

参考答案:

流程图流程图

计算机四级