1613-3-傅溥衍 总结《2016年11月19日》【连续第五十天总结】

标题:继承
关键词:人类设计
内容: 
A今日完成情况

1. 人类设计50%


B具体内容

人类设计

#include<iostream>
#include<windows.h>
#include<string.h>
using namespace std;
class person
{
	char *name;
	char sex;
	char pid[19];
	int weight;
	int high;
public:
	person();
	person(char *n,char s,char *p,int w,int h);
	void change_data(char *n,char s,char *p,int w,int h);
	void walking(int k,int v);
	void hearing(char *sentence);
	void speek(int n);
	void writing();
	void print();
	void out(int a);
	~person();
};
void person::walking(int k,int v)
{
	cout<<"\n"<<name<<"水平直线行走"<<k<<"步"<<endl;
	for(int i=0;i<k;i++)
	{
		cout<<' '<<"o _ o";
		Sleep(1000/v);
		cout<<"\b\b\b";
		
	 } 
 } 
 void person::hearing(char *sentence)
 {
 	cout<<endl<<sentence<<endl;
 	char *p=new char[strlen(sentence)+1];
 	strcpy(p,sentence);
 	char *pp=p;
 	while(*p)
 	{
 		if(*p>='a'&& *p<='z')
 			*p='A'+(*p-'a'+0);
 		else if(*p>='A'&& *p<='Z')
 			*p='a'+(*p-'A');
 			
 			p++;
	 }
	 cout<<pp<<endl;
	 delete pp;
  } 
void person::speek(int n)
{
	if(n>1999999999)
	cout<<"devc++无法处理"<<endl;
	else
	{
		int a=n/1000000000,b=(n%1000000000)/1000000;
		int c=(n%1000000)/1000,d=n%1000;
		if(a!=0)
		{ 	out(a);
			cout<<"billion";
		}
		if(b!=0)
		{	out(b);
			cout<<"million"; 
		}
		if(c!=0)
		{	out(c);
			cout<<"thousand";
		}
		if(d!=0)
		{
			if(d<100&&(a!=0||b!=0||c!=0))
			cout<<"and";
			 
		}
		cout<<endl;
	}
 } 
 
 void person::writing()
 {
 	cout<<"啊啊啊啊啊"<<endl;
 }
 int main()
 {
 	person Jack("James Chen",'M',"5923666658147520258",160,180);
 	Jack.print();
 	Jack.walking(20,4);
 	Jack.hearing("Hi! you are silly");
 	Jack.speek(1006);
 	cout<<endl;
 	Jack.writing();
 	return 0;
 }


C明日计划

A 人类设计

B 为什么需要继承



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值