摘要:
#include<stdio.h>int main(){ int i,j; int a[3][2]; for(i=0;i<3;i++){ for(j=0;j<2;j++){ a[i][j]=i+j; } } for(i=0;i<3;i++){ for(j=0;j<2;j++){ printf("%2 阅读全文
posted @ 2025-01-02 15:57
Grit_Doyle
阅读(14)
评论(0)
推荐(0)
摘要:
#include<stdio.h>#include<math.h>int reverse(int number);int main(){ int i; printf("输入一位整数:"); scanf("%d",&i); printf("它的逆序数是:%d",reverse(i)); return 阅读全文
posted @ 2025-01-02 15:54
Grit_Doyle
阅读(34)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int main(){ int i; char ch_lower,ch_upper; printf("输入需要加密的6个小写字母组成的英文单词:"); for(i=1;i<=6;i++){ scanf("%c",&ch_lower); if(ch_lower>='a 阅读全文
posted @ 2025-01-02 15:54
Grit_Doyle
阅读(18)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int main(){ char ch; printf("input characters:"); ch=getchar(); while(ch!='\n'){ if(ch>='A'&&ch<='Z') ch=ch-'A'+'a'; else if(ch>='a'& 阅读全文
posted @ 2025-01-02 15:53
Grit_Doyle
阅读(18)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int max(int a,int b);int main(){ int m,n,MAX; printf("输入两个整数:"); scanf("%d%d",&m,&n); MAX=max(m,n); printf("较大数为:%d",MAX); return 0;} 阅读全文
posted @ 2025-01-02 15:52
Grit_Doyle
阅读(11)
评论(0)
推荐(0)
摘要:
#include<stdio.h>void pyramid(int n);int main(){ int m; printf("请输入你想要的金字塔层数:"); scanf("%d",&m); pyramid(m); return 0;}void pyramid(int n){ int i,j; f 阅读全文
posted @ 2025-01-02 15:52
Grit_Doyle
阅读(21)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int sum(int m,int n);int main(){ int m1,n1,SUM; printf("输入m和n的值(m小于等于n):"); scanf("%d%d",&m1,&n1); SUM=sum(m1,n1); printf("%d",SUM); 阅读全文
posted @ 2025-01-02 15:51
Grit_Doyle
阅读(33)
评论(0)
推荐(0)
摘要:
#include<stdio.h>double cylinder(double r,double h);//函数声明 int main(){ double height,radius,volume; printf("Enter radius and height:");//提示输入半径和高度 sca 阅读全文
posted @ 2025-01-02 15:51
Grit_Doyle
阅读(42)
评论(0)
推荐(0)
摘要:
#include<stdio.h>#include<math.h>double dist(double x1,double y1,double x2,double y2);int main(){ double x1,x2,y1,y2,d; printf("输入x1:"); scanf("%lf",& 阅读全文
posted @ 2025-01-02 15:48
Grit_Doyle
阅读(106)
评论(0)
推荐(0)
摘要:
#include<stdio.h>int sign(int x);int main(){ int x,y; printf("输入自变量x:"); scanf("%d",&x); y=sign(x); printf("f(%d)=%d",x,y); return 0;}int sign(int x){ 阅读全文
posted @ 2025-01-02 15:47
Grit_Doyle
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号