自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 平年,闰年

#include <stdio.h>#include <stdlib.h>int isleapint(year){ if((year %4 == 0 && year %100 !=0) ||(year % 400 ==0)) return 1; else return 0;}int yearday(int year){ if(isleapint(year)) return 366;...

2021-11-10 09:20:56 197

原创 L1-045 宇宙无敌大招呼

输入格式:输入在第一行给出一个星球的名字S,是一个由不超过7个英文字母组成的单词,以回车结束。输出格式:在一行中输出Hello S,跟输入的S星球打个招呼。输入样例:Mars1输出样例:Hello Mars1#include"stdio.h"#include"stdlib.h"void main(){ char a[8]; gets(a); printf("Hello "); puts(a); system("pause");}...

2021-11-04 18:32:36 99

原创 L1-052 2018我们要赢

输入格式:本题没有输入。输出格式:在第一行中输出:“2018”;第二行中输出:“wo3 men2 yao4 ying2 !”。输入样例:无输出样例: 2018 wo3 men2 yao4 ying2 ! #include<iostream>using namespace std;int main(){ cout<<"2018"<<endl; cout<<"wo3 men2 yao4 yi

2021-11-04 18:30:15 68

原创 2021-11-03

输入样例:988 7输出样例:691.60#include<stdio.h>#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; printf("%.2f",0.1*a*b); return 0;}

2021-11-03 09:23:03 61

原创 L1-060 心理阴影面积

三角形的面积 = 底边长 x 高 / 2;矩形面积 = 底边长 x 高输入样例:90 10输出样例:4000#include <cstdio>#include <iostream>using namespace std;int main(){ int x, y; scanf("%d %d", &x, &y); printf ("%d", 5000-(y+100-x)*50); return 0;...

2021-11-03 09:18:35 131

原创 L1-073人与神

输入样例:无输出样例:To iterate is human, to recurse divine.#include <stdio.h>int main(){ printf("To iterate is human, to recurse divine.\n"); return 0;}

2021-11-03 09:15:11 61

原创 L1-074 两小时学完C语言

输出格式:在一行中输出宝宝还没有看的字数。输入样例:100000 1000 72结尾无空行输出样例:28000结尾无空行#include<stdio.h>int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%d",a-b*c); return 0;}...

2021-11-03 09:12:51 406

原创 L1-026 I Love GPLT

#include <iostream>using namespace std;int main() { string s = "I Love GPLT"; for(int i = 0; i < s.length(); i++) { cout << s[i] << endl; } return 0;}

2021-11-03 09:02:08 67

原创 L1-038新世界

输入样例:无输出样例: Hello World Hello New World #include<stdio.h>int main(){printf("Hello World\n");printf("Hello New World\n");return 0;}

2021-11-03 08:52:25 61

原创 L1-066猫是液体

输入格式:输入在第一行中给出 3 个不超过 100 的正整数,分别对应容器的长、宽、高。输出格式:在一行中输出猫的体积。输入样例:1 | 23 15 20输出样例:1 | 6900#include <iostream>using namespace std;int main() { int a, b, c; cin >> a >> b >> c; cout << a*b*c;}...

2021-11-03 08:34:28 225

原创 L1-008求整数段和

输入格式:输入在一行中给出2个整数A和B,其中-100<=A<=B<=100,其间以空格分隔。输出格式:首先顺序输出从A到B的所有整数,每5个数字占一行,每个数字占5个字符宽度,向右对齐。最后在一行中输出全部数字的和。输入样例:-3 8输出样例:-3 -2 -1 0 12 3 4 5 67 8Sum = 30#include<stdio.h>#include<string.h>int main(){ int i,su...

2021-11-03 08:29:43 47

原创 L1-036 A乘以B

输入格式:输入在第一行给出两个整数A和B(−100≤A,B≤100),数字间以空格分隔。输出格式:在一行中输出A乘以B的值。输入样例:-8 13结尾无空行输出样例:-104结尾无空行1 #include<iostream>2 using namespace std;3 int main()4 {5 int a,b;6 cin>>a>>b;7 cout<<a*b<<e...

2021-11-03 00:03:11 41

原创 L1-026 是不是太胖了

输入格式:输入第一行给出一个正整数H(100<H≤300),为某人身高。输出格式:在一行中输出对应的标准体重,单位为市斤,保留小数点后1位。输入样例:169结尾无空行输出样例:124.2结尾无空行#include"stdio.h"#include"stdlib.h"void main(){ int a; double b; scanf("%d",&a); b=(a-100)*0.9*2; printf("%.1f"...

2021-11-03 00:00:11 54

原创 L1-024后天

输入格式:输入第一行给出一个正整数D(1≤D≤7),代表星期里的某一天。输出格式:在一行中输出D天的后天是星期几。输入样例:3#include"stdio.h"int main(){int a;scanf("%d",&a);a=a+2;if(a>7) a=a-7;printf("%d",a);return 0;}...

2021-11-02 23:57:17 64

原创 L1-014简单题

输入样例:无结尾无空行输出样例:This is a simple problem.结尾无空行#include <stdio.h>int main(){printf("This is a simple problem.");return 0;}

2021-11-02 23:54:11 61

原创 L1-021重要的话说三遍

输入样例:无结尾无空行输出样例:I'm gonna WIN!I'm gonna WIN!I'm gonna WIN!结尾无空行#include<cstdio>#include<cstdlib>#include<cstring>#include<string>#include<ctime>#include<cmath>#include<iostream>#include<

2021-11-02 23:50:42 46

原创 L1-012计算指数

输入格式:输入在一行中给出一个不超过 10 的正整数n。输出格式:在一行中按照格式2^n = 计算结果输出2n的值#include<stdio.h>int main(){ int n = 0,sum=1; scanf("%d", &n); for (int i = 1;i <= n;i++) { sum *= 2; } printf("2^%d = %d",n, sum); ret...

2021-11-02 23:46:51 79

原创 L1-007念数字

输入格式:输入在一行中给出一个整数,如:1234。提示:整数包括负数、零和正数。输出格式:在一行中输出这个整数对应的拼音,每个数字的拼音之间用空格分开,行末没有最后的空格。如 yi er san si。输入样例:-600输出样例:fu liu ling ling#include<stdio.h>int main(){ char cs;int a=0; //定义变量a,用来判断循环结束 scanf("%c",&cs); while(a!...

2021-11-02 23:42:58 62

原创 L1-00题目描述:给定一个华氏温度F,本题要求编写程序,计算对应的摄氏温度C。计算公式:C=5×(F−32)/9。题目保证输入与输出均在整型范围内。输入格式:输入在一行中给出一4计算摄氏温度

#include <stdio.h>int main(){int F,C;scanf("%d",&F);C = 5 * (F - 32)/9;printf("Celsius = %d",C); return 0;}

2021-11-02 21:42:31 954

原创 L1-002打印沙漏

思路 :成沙漏形状是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,在从小到大顺序递增;首尾符号数相等。#include <stdio.h>int main(){ int i,kong,n=0,N,fuhao; char op; scanf("%d",&N); scanf("%c",&op); while(N>2*n*n-1) n++; if(2*n*n-...

2021-11-01 15:35:56 58

原创 L1-001Hello world

#include <stdio.h>#include <stdlib.h>int main(){ printf("Hello world!\n"); return 0;}

2021-11-01 14:43:19 44

空空如也

空空如也

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

TA关注的人

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