自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 判断素数

判断素数 代码如下: #include <stdio.h> #include <stdlib.h> int main() { int x; int count=0; int i; scanf("%d",&x); for(i=2;i<x;i++) { if(x%i0) count++; } if(count0) printf(“This is a prime.”); else printf(“This is not a prime.”); return 0; } 运行结果

2021-01-26 10:22:56 120

原创 求两个整数之和

求两个整数之和 代码: #include <stdio.h> #include <stdlib.h> int main() { int a,b; int he; scanf("%d %d",&a,&b); he=a+b; printf("%d",he); return 0; } 运行结果:

2021-01-23 15:27:33 158

原创 求三个整数中的最大值

输入三个数,输出最大值 #include <stdio.h> #include <stdlib.h> int main() { int a,b,c; int max; scanf("%d %d %d",&a,&b,&c); if(a>b&&a>c) max=a; else if(b>a&&b>c) max=b; else max=c; printf("%d",max); return 0; } 运行结果

2021-01-21 19:32:10 1629

原创 摄氏温度转化为华氏温度

输入摄氏温度(c),转化为华氏温度(f)并输出 #include <stdio.h> #include <stdlib.h> int main() { float c; float f; scanf("%f",&c); f=c9/37; //华氏=摄氏9/37 printf(“f=%.2f”,f); return 0; }

2021-01-17 17:35:57 574

空空如也

空空如也

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

TA关注的人

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