C程序设计编程题
#include"stdio.h"
intr,c;
for(r=0;r
printf("输入第%d行%d个数:",r+1,m);
for(c=0;c
scanf("%d",&d[r][c]);
voidfun(intd[][100],intm,int*r,int*c)
inti,j;
*r=0;*c=0;
for(i=0;i
for(j=0;j
if(d[*r][*c]
*r=i;*c=j;
intmain()
intd[100][100];
intm;
inti,j,r,c;
printf("输入阶数:");
scanf("%d",&m);
input(d,m);
fun(d,m,&r,&c);
printf("最大元素位于(%d,%d),值为:%d\n",r+1,c+1,d[r][c]);
#include"stdio.h"
voidfun(char*p,char*q)
inti,j;
i=0;j=0;
while(*(p+i)!=\0)
*(q+j)=*(p+i);
if((i+1)%3==0)
j+=1;
*(q+j)=;
*(q+j)=\0;
intmain()
file*fp1,*fp2;
charp[100],q[100];
if((fp1=fopen("form.tXT","r"))==NULL)
printf("form.txt");
if((fp2=fopen("to.txt","w"))==NULL)
printf("to.txt");
fscanf(fp1,"%s",p);
fun(p,q);
fprintf(fp2,"%s",q);
一道计算机编程题
#includefunc(intif(i==1){returnif(i==2){returnif(i>=3){returnfunc(i-1)*func(i-2)%10;}else{returncout<