2019-11-05 21:11:41
#include <stdio.h>struct car{ char cName[20]; int iNumber;}car[5]={{"宝马",491000},{"大众",8000},{"路虎",1150000},{"五菱",50000},{"一汽",107800}};int main(){ int i; for(i=0;i<5;i++){ printf("NO%d
2019-11-04 23:22:42
#include <stdio.h>void main(int argc,char *argv[]){ printf("the list of parameter:\n"); printf("命令名:\n"); printf("%s\n",*argv); printf("参数个数:\n"); printf("%d\n",argc);}
2019-11-04 23:05:24
#include <stdio.h>int *per(int a,int b);int Perimeter;void main(){ int iWidth,iLength; int *iResult; printf("请输入长方形的长:\n"); scanf("%d",&iLength); printf("请输入长方形的宽:\n"); scanf("%d",&iWidth); iResul
2019-11-04 22:53:44
#include <stdio.h>int per(int a,int b);void main(){ int iWidth,iLength,iResult; printf("请输入长方形的长:\n"); scanf("%d",&iLength); printf("请输入长方形的宽:\n"); scanf("%d",&iWidth); iResult=per(iWidth,iLength)
2019-11-04 22:42:14
#include <stdio.h>#define N 4void max(int(*a)[N],int m){ int value,i,j,sum=0; for(i=0;i<m;i++){ value=*(*(a+i)); for(j=0;j<N;j++) if(*(*(a+i)+j)>value) value=*(*(a+i)+j); printf("第%d行:最大数是:%d\n",i,value); sum=sum+v
2019-11-03 21:24:53
#include <stdio.h>struct Student{ char cName[20]; char Sex; int iGrade;}student1={"hanxue",'w',3};int main(){ struct Student student2={"wangjiasheng",'M',3}; printf("the student1's information:\n&quo
2019-11-03 00:07:09
#include <stdio.h>#include <string.h>struct car{ char name[64]; char color[20]; float length; int seniority;};int main(){ struct car a_car; strcpy(a_car.name,"路虎"); strcpy(a_car.color,"黑色"); a_car.length=4.85f; a
2019-11-02 23:17:20
#include <stdio.h>#include <string.h>void sort(char *strings[],int n){ char *temp; int i,j; for(i=0;i<n;i++){ for(j=i+1;j<n;j++){ if(strcmp(strings[i],strings[j])>0) { temp=strings[i]; strings[i]=strings[j]; strings
2019-11-01 23:46:52
#include <stdio.h>void order(int *p,int n){ int i,t,j; for(i=0;i<n-1;i++) for(j=0;j<n-1-i;j++) if(*(p+j)>*(p+j+1)){ t=*(p+j); *(p+j)=*(p+j+1); *(p+j+1)=t; } printf("排序后的数组:\n"); for(i=0;i<n;i++){ if(i%
2019-11-01 23:20:58
#include <stdio.h>void SUM(int *p,int n){ int i,sum=0; for(i=0;i<n;i++) sum=sum+*(p+i); printf("面值的总数是:%d\n",sum);}int main(){ int *pointer,a[7],i; pointer=a; printf("please input :\n"); for(i=0;i<7;i++) scanf("