自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 c++实验6

#include using namespace std; int main () { char a[20],b[20]; int k,i=0,j=0; cout<<"请输入字符串a:"; cin.getline(a,20); c

2016-05-28 15:00:31 232 1

原创 c++作业6

合并 #include using namespace std; void main() { int a[6]={0,1,2,3,4,5},b[5]={2,4,6,8,9},c[11],i,j,k=0; for(i=0,j=0;i<6,j<5;) { if(a[i]>b[j])

2016-05-28 14:46:43 196 2

原创 c++实验5

#include using namespace std; int main() { int a[10],b[10],c[10],i,m=0,n=0; cout<<"请输入10个数:"; for(i=0;i<=9;i++) { cin>>a[i];

2016-05-15 00:27:07 263

原创 c++作业5

求和 #include using namespace std; int main() { const int a; int A[10],sum1=0,sum2=0,i; cout<<"请输入十个数,用空格分开:"; for(i=0;i<10;i++) {

2016-05-15 00:20:40 179

原创 c++实验4 星号图

#include using namespace std; int main( ) { int i,j,n=6; //输出第一行:n-1个空格和1个星号并换行 for(j=1; j<=n-1; ++j) //输出n-i个空格 cout<<" "; cout<<"*"<<endl;

2016-04-27 22:32:41 482 1

原创 c++作业4

1 求和#include using namespace std; int main() { int i=2,sum=0; while(i<=1000) { sum+=i; i=i+2; } cout<<"sum="<<sum<<endl; return 0; } #include voi

2016-04-21 11:50:03 307 1

原创 c++作业3

本月还有几天# include using namespace std; int main() { int year,month,days; count<<"请输入年份,月份"; cin>>year>>month; if(year%4==0&&year%100!=0||year%400==0) {if(month%2==0&&month!=2)

2016-04-13 23:08:41 259 3

原创 c++第2次作业

#include #include using namespace std; int main() { double x1,y1,x2,y2; double d; double m,n; cout<<"请输入两点坐标:"; cin>>x1>>y1>>x2>>y2; m=x1-x2; n=y1-y2; d=sqrt(m*m+n*n); cout<<"两点间的距离为:"<<d<<en

2016-04-13 22:40:39 305

原创 c++实验2体重

/*作 者:潘贤 *完成日期:2016年 3月 24日 *版 本 号:1.0 * *问题描述:成年男性的标准体重公式为:标准体重(kg)=身高(cm)-100,超标准20%为超重,比标准体重轻20%为超轻。 *输入描述:两个整数,代表身高和体重。 *输出描述:给出提示是否正常 */ #include using namespace std; int mai

2016-03-24 11:36:01 332

原创 第1次上机实验-3

#include void main() { const double PI=3.1415926; double r; double s; double c; count<<"输入半径r:"; cin>>r; s=PI*r*r c=2.0*PI*r count<<"圆的周长:"<<r<<"是:"<<s; count<<"圆的面积:"<<r<<"是:"; }

2016-03-10 11:43:59 288

原创 第1次上机实验-1

#include using namespace std; int main( ) { int a,b,sum; cin>>a>>b;//输入两个整数,两个数之间用空格分开 sum=a+b; cout<<"a+b="<<sum<<endl; return 0; }

2016-03-10 11:02:53 236

原创 第1次上机实验-2

#include //包含输入,输出文件 using namespace std; int main( ) { int R,R1,R2; //定义变量 cout<<"两个电阻值:";

2016-03-10 11:00:38 226

空空如也

空空如也

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

TA关注的人

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