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

原创 定义int a[10]={1,2,3,4,5}; 然后显示其10个元素,显示宽度为3

#include <iostream>#include <iomanip>using namespace std;int main(){ int i; for (i=0;i<=10;i++) { int a[10]={1,2,3,4,5}; cout<<setw(3)<<a[i]; i=i; } cout<...

2018-06-01 13:43:08 2947

原创 extern声明语句

file1.cpp#include<iostream>using namespace std;int main(){ int r; double s; cin>>r; extern double pi; //使用extern声明语句声明外部变量pi s=pi*r*r; cout<<s<<endl; return 0...

2018-05-30 22:59:21 248

原创 100-200内的素数

#include <iostream>#include <cmath>using namespace std;int main(){ int a,b,c; bool prime; for(a=100;a<=200;a++) { prime=1; b=int(sqrt(a)); for(c=2;c<=sqrt(a);c++) if...

2018-05-29 23:20:15 149

原创 c++闰年平年的判断

#include <iostream>using namespace std;int main(){ int year; cout << "please enter year" << endl; while (cin >> year) { if (year > 0) break; else { cout &...

2018-05-29 21:50:54 5203 2

原创 c++程序例题

计算圆的面积#include<iostream>using namespace std;#define pi 3.1415926int main(){ double r,area; cin >> r; area=pi*r*r; cout << "area=" <<area<< endl;}计算三角形的面积#include...

2018-05-21 22:57:34 836

空空如也

空空如也

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

TA关注的人

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