摘要:
#include#includetypedef struct Node{ int curadd; int data; int nextadd;}Node;int main(){ int n,k,firstadd,i,num,j; Node *a,temp; int c; while(scanf("%... 阅读全文
摘要:
#include #include void Reverse(char *str,int low,int high){ char e; while(low<high) { e=str[low]; str[low]=str[high]; st... 阅读全文
摘要:
#includetypedef struct X_L{ double x; double y;}X_L;int main(){ X_L v1,v2; double a,b; while(scanf("%lf%lf%lf%lf",&v1.x,&v1.y,&v2.x,&v2.y)!=EOF) { a=... 阅读全文
摘要:
#include#includevoid reverse(char *s,int low,int high){ char t; while(low<high) { t=*(s+low); *(s+low)=*(s+high); *(s+high)=t; low++; high--; }}i... 阅读全文
摘要:
#include#includeint main(){ char str[81],e; int i,len; while(gets(str)!=NULL) { len=strlen(str); for(i=0;i<len/2;i++) { e=str[i]; str[i]=str[le... 阅读全文
摘要:
#include#includeint issubstring(char *s1,char *s2){ int i=0,j; int len2=strlen(s2); while(s1[i+len2-1]!='\0') { for(j=0;s2[j]!='\0';j++) if(s1[i+j]... 阅读全文
摘要:
#includeint main(){ char e,str[80]; int i; while(gets(str)!=NULL) { e=getchar(); if(e=='\n') scanf("%c",&e); i=0; while(str[i]!='\0'){ if(str[i]... 阅读全文
摘要:
#includevoid output(char *str){ int i=0; int j; while(str[i]!=' '&&str[i]!='\0') i++; if(str[i]==' ') output(str+i+1); if(str[i]==' ') printf(" "); fo... 阅读全文
摘要:
#includeint main(){ int a[10]; int i,j; while(~scanf("%d",&a[0])) { for(i=1;i0){ printf("%d",i); a[i]--; break; } for(i=0;i<10;i++) for... 阅读全文
摘要:
#include#includeint main(){ int m,n,i,j; int count; int **a; while(~scanf("%d%d",&m,&n)) { if(m20||n>20) continue; count=0; a=(int **)malloc(m*size... 阅读全文
摘要:
#include#includeint main(){ int m,n,i,j; int count; int **a; while(~scanf("%d%d",&m,&n)) { if(m20||n>20) continue; count=0; a=(int **)malloc(m*size... 阅读全文
摘要:
#include#includeint main(){ int n,i,max; int *a; int b[10]; while(~scanf("%d",&n)) { for(i=0;imax) max=b[i]; printf("%d:",max); for(i=0;i<10;i++) ... 阅读全文
摘要:
#include#includeint main(){ int n,x,i; int *a; while(~scanf("%d%d",&n,&x)) { if(n>20) continue; a=(int *)malloc(n*sizeof(int)); for(i=0;i<n;i++) sc... 阅读全文
摘要:
#include#includeint isprime(int n){ if(n==2||n==3) return 1; if(n%2==0) return 0; int i; for(i=3;in) continue; count=0;i=2;flag=1; while(count=m&&is... 阅读全文
摘要:
#include#includeint main(){ int n,i; long a,b,c; int *d; scanf("%d",&n); d=(int *)malloc(n*sizeof(int)); for(i=0;ic)?1:0; } for(i=0;i#includetypedef s... 阅读全文
摘要:
#includeint main(){ int n,i; int a,b,c; while(scanf("%d",&n)!=EOF) { if(n>=1000||n<1) continue; a=n/100; b=n/10%10; c=n%10; for(i=0;i<a;i++) prin... 阅读全文