自定义博客皮肤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)
  • 收藏
  • 关注

原创 选择结构-闰年判断

书本例题#include<stdio.h> int main(void) { int year,leap; scanf("%d",&year); if(year%4==0) { if(year%100==0) { if(year%400==0) leap=1; else le...

2020-04-07 11:21:56 1557

原创 三个整数按从小到大排序

从键盘输入三个整数按从小到大的顺序输出#include<stdio.h> int main(void) { int a,b,c,t; printf("请输入三个整数:"); scanf("%d %d %d",&a,&b,&c); if(a>b) { t=a; a=b; b=t; } ...

2020-04-07 11:20:39 2914 1

原创 C语言计算两个正整数的最大公约数

#include<stdio.h>int MaxCommonFactor( int a, int b){ int c; if(a<=0||b<=0) return -1; while(b!=0) { c=a%b; a=b; b=c; } return a; } int ma...

2020-04-07 11:18:35 3067 1

原创 下列程序是不用第三个变量,实现将两个数进行对调的操作。

#include<stdio.h> int main(void) { int a,b; scanf("%d%d",&a,&b); printf("a=%d b=%d\n",a,b); a=a+b; b=a-b; a=a-b; printf("a=%d b=%d\n",a,b); retu...

2020-04-07 11:12:25 10624

原创 写一个加法程序,输入整数a,b,输出他们的和。

#include<stdio.h> int main(void) { int a,b,c; scanf("%d,%d",&a,&b); c=a+b; printf("%d+%d=%d\n",a,b,c); return 0; }

2020-04-07 11:10:57 8803

空空如也

空空如也

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

TA关注的人

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