博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

C++编程设计之路

guanbin.cublog.cn


学习C++的第3个练习题

用*号编写出一个简单的“C++”图形。

 

// Exercise 2.16

// Create an application that displays a welcome message

#include <iostream> // required to perform C++ stream I/O


using namespace std; // for accessing C++ Standard Library members


// function main begins program execution

int main()
{
    cout << "\n**********************************\n* Welcome to *\n* *** *\n* * * *\n* * * * *\n* * *** *** *\n* * * * *\n* * * *\n* *** *\n**********************************\n";
    system("pause");
   return 0; // indicate that program ended successfully


}

发表于: 2007-03-02 ,修改于: 2007-03-02 20:46,已浏览367次,有评论1条 推荐 投诉


网友评论
内容:
头文件差一个:
#include <stdlib.h>

Blog作者的回复:
不知道啊,我是照着书上的例题练习的.我想应该没错的啊.这个联系,只定义数据输入输出流就可以了吧,我是新人,很多都要想朋友们学习的.

墨玉评论于:2007-03-23 20:30:02 (61.157.243.★)

发表评论