自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 求矩阵的转置(C语言)

函数 #include<stdio.h> #define N 3 void transpose(int a[N][N]){ int b[N][N],i,j; printf("array a=\n"); for(i=0;i<N;i++){ for(j=0;j<N;j++){ printf("%3d",a[i][j]); b[j][i]=a[i][j]; } printf("\n"); } printf("array b=\n"); for(i=0;i

2021-03-20 15:29:24 606

原创 从1-n的素数(C语言)

#include<stdio.h> #include<math.h> #define N 10000 bool prime[N]; int main() { int i,j,k=1; prime[2]=true;//2是素数 for(i=3;i<=N;i++){ if(i%2==0) prime[i]=false; else prime[i]=true; } for(i=3;i<=sqrt(N);i=

2021-03-20 10:53:58 816

原创 求平均值(C语言)

#include<stdio.h> int main() { int number; int sum = 0; int count = 0; double mean; scanf_s("%d", &number);#visual studio中输入为scanf_s while (number != -1) { sum = sum + number; count++; scanf_s("%d", &number); } mean = sum / coun

2021-03-18 21:50:52 7240 2

原创 排序问题(C语言)

#include<stdio.h> #define N 19 int main() { int a[N], b[N], k = 0,i=0,j; for ( i ; i < N; i++) { scanf_s("%d", &a[i]); b[i] = 1000; } i = 0; for ( i ; i < N; i++) { j = 0; for ( j ; j <

2021-03-18 21:37:32 60

原创 1001 A+B Format(C语言)

1001 A+B Format (20 分) Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Specification: Each input file contains one test case. Each ca

2021-03-07 21:37:51 104

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除