自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【无标题】

#include <iostream> #include <iomanip> using namespace std; class Rational { private: signed int x; signed int y; public: Rational() { x = 0; y = 1; } void Add(int a, int b,int c,int d) { x = (a * d) + (c * b); y = b * d; } voi

2021-12-17 16:13:22 226

原创 判断是数字还是英文字母

#include <iostream> using namespace std; int main() { char a; cin >> a; for (; a >= 'A' && a <= 'Z';) { cout << "char"; exit(1); } for (; a >= 'a' && a <= 'z';) { cout << "char"; exit(1); }

2021-11-11 22:49:57 70

原创 这一天是这一年的第几天?

#include <iostream> using namespace std; int fun( int m,int y ) { int d; switch (m) { case 1:case 3:case 5:case 7:case 8:case 10:case 12: d = 31; break; case 4:case 6:case 9:case 11: d = 30; break; case 2:if ((y % 4 == 0) && (y % 10

2021-11-11 22:23:59 55

原创 2021-10-19字符型与整型互换

#include <iostream> using namespace std; int main() { char b; int a, c; cin >> b; a = (int)b - 1; c = (int)b + 1; cout << (char)a << " " << (char)c; }

2021-10-19 17:20:25 77

原创 2021-10-18取一个数的前1、2、3位

#include <iostream> using namespace std; int main() { int x, a, b, c; cin >> x; a = x / 100; b = x % 100 /10; c = x % 10; if (x == ((a *a*a) + (b*b*b) + (c*c*c))) {cout << "yes"<<endl;} else { cout << "no"<<end

2021-10-18 18:46:31 388

原创 2021-10-18

#include <iostream> using namespace std; int main() { int time1, time2, t1, t2, h, m; cin >> time1 >> time2; t1 = (time1 / 100) * 60 + (time1 % 100); t2 = (time2 / 100) * 60 + (time2 % 100); h = (t2 - t1) / 60; m = (t2 - t1) % 60;

2021-10-18 14:52:43 28

原创 2021-10-17

#include <iostream> using namespace std; int main() { cout << " ##### " <<endl ; cout << "# #" << endl; cout << "# #" << endl; cout << " ##### " << endl; cout << "# #" << e

2021-10-17 18:04:21 35

空空如也

空空如也

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

TA关注的人

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