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

原创 C++ 统计字符个数

#include<iostream>#include<string>using namespace std;int main() { string str; int letter=0,space=0,digit=0,other=0; getline(cin,str); for(int i=0; i<str.length(); i++) { if(str[i]>=48&&str[i]<=57) digit++; else if(.

2022-03-29 14:16:12 3911

原创 C++ 完数计算

# include <iostream>using namespace std;int main(){ int i,j,n,sum; cin>>n; for(i=2;i<=n;i++) { sum=0; for(j=1;j<=i/2;j++) if(i%j==0) sum+=j; if(sum==i) cout<&.

2022-03-22 00:14:30 1198

原创 C++ 日期计算

# include <iostream>using namespace std;int main(){ int y, m, d, sum = 0; int days[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; cin >> y >> m >> d; if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0) days[1].

2022-03-21 23:55:47 1291

原创 C++ 级数求和

# include <iostream># include <math.h>using namespace std;int main() { cout.precision(5); int a,b; float x,n=0,s=0; cin>>x; for(int i=1; i<=10; i++) { if(i%2==0) a=-1; else a=1; b=i*2-1; n=a*pow(x,b); for(int j.

2022-03-21 23:12:23 2057

空空如也

空空如也

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

TA关注的人

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