#includevoid TestFunc(); int average_num(double a[],int n,double b[]) { } main() { double a[100],b[100]; int n,i,num; printf("input n:"); scanf("%d",&n); printf("input %d data:n",n); for(i=0;i int i,m=0; double avg=0; for(i=0;ia[i]) b[m++]=a[i]; return m; 2
#include "stdio.h" #include "string.h" #include "conio.h" #define N 81 void fun(char *str,int n) { } TestFunc() { FILE *IN,*OUT; char sIN[20],*sOUT; int iLENGTH; IN=fopen("in.dat","r"); if(IN==NULL) { printf("Please Verify The Currernt Dir..It May Be Changed"); } OUT=fopen("out.dat","w"); if(OUT==NULL) { printf("Please Verify The Current Dir.. It May Be Changed"); } fscanf(IN,"%s",sIN); iLENGTH=strlen(sIN); sOUT=sIN; fun(sIN,iLENGTH); fprintf(OUT,"%sn",sOUT); fclose(IN); fclose(OUT); } main() { char s [N]; int l; printf("input a string:");gets(s); l=strlen(s); fun(s,l); printf("The new string is :");puts(s); TestFunc(); }答案
int i,j; char c; for(i=0,j=n-1;i欢迎分享,转载请注明来源:内存溢出
C语言程序设计大题1
赞
(0)
打赏
微信扫一扫
支付宝扫一扫
STM32CubeIDE系列教程-07使用USART中断接收数据
上一篇
2022-12-15
windows一段时间后发现C盘满了如何检查并清理
下一篇
2022-12-15
评论列表(0条)