自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Arac

渣.

  • 博客(11)
  • 收藏
  • 关注

转载 C++输入输出流格式控制

1.使用控制符控制输出格式 控制符 作用 dec 设置整数的基数为10 hex 设置整数的基数为16 oct 设置 整数的基数为8 setbase(n) 设置整数的基数为n(n只能是16,10,8之一) setfill(c) 设置填充字符c,c可以是字符常量或字符变量 setprecision(n) 设置实数的

2013-10-28 22:13:10 517

原创 i-s

// // main.c // Hello // // Created by Arac on 15/10/21. // Copyright © 2015年 Arac. All rights reserved. // #include #include #define ARR_SIZE 10 void InsertionSort(int *eopr); int main(int

2015-10-22 12:58:13 418

原创 C++ 实验八

#include #include using namespace std; class MyDate { public: MyDate(int y,int m,int d){year=y;month=m;day=d;} void diffYear(){diffyear=((2010-year)*12.0-month+1)/12.0;} int getyear(){r

2013-12-25 23:34:19 603

原创 C++ 实验九

#include "stdafx.h" #include #include using namespace std; class Money { public: Money(int yuan_i, int jiao_i, int fen_i){ yuan = yuan_i; jiao = jiao_i; fen = fen_i; } Money(){}; ~Money()

2013-12-25 23:25:14 578

原创 C++ 实验八

#include #include using namespace std; const double PI = 3.1415926; class CStereoShape{ public: virtual double GetArea() = 0; virtual double GetVolume() = 0; }; class CCube : public CStere

2013-11-22 14:48:57 827

原创 C++ 实验六

//两个类; #include class CPoint { public: CPoint(void){xLoc = 0; yLoc = 0;} CPoint(double xLoc_Init, double yLoc_Init) { xLoc = xLoc_Init; yLoc = yLoc_Init; }; ~CPoint(){}; double GetX(void)

2013-11-15 14:27:07 710

原创 C++ 实验五

//设计一个名为Fan的类, 表示一个风扇; #include #include using namespace std; #define ON 1 #define OFF 0 class Fan { public: Fan(int speed, double radius, string color, bool on); ~Fan(); void display(void);

2013-11-10 19:00:50 665

原创 C++ 实验四

//极坐标转换直角坐标; #include #include #define K (0.017453292519943295769236907684886l) using namespace std; void convert(double &x, double &y, double radius, double phi); void convert(double *x, double *

2013-11-10 18:29:35 568

原创 C++ 实验三

//一个班有 5 名学生,每个学生修了五门课, //求每个学生的平均成绩,并输出每个学生的学号, //每门课程的成绩及平均值。 #include "stdafx.h" #include #include #include using namespace std; #define WIDTH 15 struct stu { string number; double math, e

2013-11-08 14:18:58 972

原创 C++ 实验二

//写一个程序,输入某雇员的每周工作时间(以小时计)和每小时的工资数,计算并输出他的工资。 //若雇员周工作小时超过40 小时,则超过部分按原工资的1.5 倍的加班工资来计算。 //若雇员每周工作小时超过60 小时,则超过60 的部分按原工资的3 倍的加班工资来计算, //而40 到50 小时的工资仍按照原工资的1.5 倍的加班工资来计算。 #include "stdafx.h" #includ

2013-10-28 22:30:57 616

原创 C++ 实验一

//从键盘上输入两个int型数,比较其大小,并输出显示其中较小的数 #include "stdafx.h" #include using namespace std; int getSmaller(const int q, const int c); int main(void) { int ssta, isa; cout << "plz input two shuzi: "<< end

2013-10-18 14:40:58 1369

空空如也

空空如也

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

TA关注的人

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