C语言看了一段时间,感觉没啥进步,都在原地踏步,啥时候能有所突破呢。唉.....
#include <stdio.h>
int main(void)
{
char id[17];
int idx[17]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
char last[11]={'1','0','X','9','8','7','6','5','4','3','2'};
int sum=0,i;
printf("Please input ID:");
for (int i=0;i<17;i++)
{
scanf("%c",&id[i]);
//printf("%c",id[i]);
...
第9题:
#include <stdio.h>
double inpr(const double*a,const double*b,int n);
int main(void)
{
double a1[3]={1.1,2.2,3.3};
double b1[3]={4.4,5.5,6.6};
printf("%.2f",inpr(a1,b1,3));
return 0;
}
double inpr(const double*a,const double*b,int n)
{
const double *...
#include <stdio.h>
#define N 10
void ftl(int [],int,int*,int*);
int main(void)
{
//int a[N]={1,287,100,92,287,920,56,98,24,88};
int big,big2;
for(int i=0;i<N;i++)
{
printf("a[%d]==",i);
scanf("%d",&a[i]);
}
ftl(a,N,&big,&big2);
printf("\n\n\n1st==%d...
#include <stdio.h>
void ar1(int[],int);
int main(void)
{
int a[13]={5,-9,3,0,-4,8,-1,7,6,2,-1000};
ar1(a,10);
printf("最大数为:%d\n",a[10]);
printf("\n平均值为:%.2f\n",(double)a[11]/10);
printf("\n正整数共有 %d 个" ,a[12]);
return 0;
}
void ar1(int a[],int n)
{
for(int i=0;...
C越来越看不下去了,咋办啊