上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: #include<stdio.h>int main(){ int i,index,k,n,temp; int a[10]; printf("Enter n:"); scanf("%d",&n); printf("Enter %d integers:",n); for(i=0;i<n;i++){ sc 阅读全文
posted @ 2025-01-02 16:01 Grit_Doyle 阅读(14) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,response; int count[9]; for(i=1;i<=8;i++){ count[i]=0; } for(i=1;i<=10;i++){ printf("Emter your response:"); scanf( 阅读全文
posted @ 2025-01-02 16:00 Grit_Doyle 阅读(19) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int count,i; char str[80]; printf("Enter a string:"); i=0; while((str[i]=getchar())!='\n'){ i++; } str[i]='\0'; count=0; 阅读全文
posted @ 2025-01-02 16:00 Grit_Doyle 阅读(21) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,number; char str[10]; printf("Enter a string:"); i=0; while((str[i]=getchar())!='\n'){ i++; } str[i]='\0'; number=0 阅读全文
posted @ 2025-01-02 15:59 Grit_Doyle 阅读(15) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ //输出斐波那契数列 int i; int fib[10]={1,1}; for(i=2;i<10;i++){ fib[i]=fib[i-1]+fib[i-2]; } for(i=0;i<10;i++){ printf("%6d",fib[i 阅读全文
posted @ 2025-01-02 15:59 Grit_Doyle 阅读(11) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ //输入10个数。输出所有大于平均数的值 int i; double average,sum; int a[10]; printf("Enter 10 integers:"); sum=0; for(i=0;i<10;i++){ scanf( 阅读全文
posted @ 2025-01-02 15:59 Grit_Doyle 阅读(23) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,index,n; int a[10]; printf("Enter n:"); scanf("%d",&n); printf("Enter %d integers:",n); for(i=0;i<n;i++){ scanf("%d 阅读全文
posted @ 2025-01-02 15:58 Grit_Doyle 阅读(18) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int col,i,j,row; int a[3][2]; printf("Enter 6 integers:\n"); for(i=0;i<3;i++){ for(j=0;j<2;j++){ scanf("%d",&a[i][j]); } 阅读全文
posted @ 2025-01-02 15:58 Grit_Doyle 阅读(15) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,k; char line[80]; printf("Enter a string:"); k=0; while((line[k]=getchar())!='\n'){ k++; } line[k]='\0'; i=0; k=k-1 阅读全文
posted @ 2025-01-02 15:58 Grit_Doyle 阅读(12) 评论(0) 推荐(0)
摘要: #include<stdio.h>int main(){ int i,j,n,temp; int a[6][6]; printf("Enter n:"); scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ a[i][j]=i*n+j+1; } } 阅读全文
posted @ 2025-01-02 15:57 Grit_Doyle 阅读(11) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页