c++ lesson 一(命名空间输入输出)
2016-04-06 21:33
134 查看
// // main.cpp // C++lessonOne // // Created by keyan on 15/11/13. // Copyright © 2015年 keyan. All rights reserved. // #include <iostream> #include <cmath> int main(int argc, const char * argv[]) { // insert code here... using namespace std; cout <<"Come up and C++ me some time"; cout <<endl; int carrots; cin >> carrots; carrots = carrots + 2; cout << "You won.t regret it!" <<endl; cout<<"Carrots"<<carrots<<"haha"<<endl; std::cout << "Hello, World!\n"; using namespace std; double area; cout<<"kaishi"; cin>>area; double side; side = sqrt(area); cout<<"That the equivalent of a square"<<side <<"feet to side"<<endl; cout<<"How fascinating"<<endl; return 0; }
相关文章推荐
- C++顺序性容器、关联性容器与容器适配器
- C++第3次实验-项目一
- C++ 二维动态数组创建及越界问题
- 鬼话连篇(二)——简单工厂模式(C++/C#)
- C++_智能指针
- C++生成DLL导出函数的小demo
- 一个简单的C语言的汇编程序
- C++走向远洋——32(项目一内全部成员函数)
- C语言问卷
- C++走向远洋——31(六周,项目一,1.1)
- 基于C++11的事件驱动框架
- c++primer(第五版) 第十四章 重载运算与类型转换习题答案
- C++走向远洋——30(六周,项目一1.0)
- power(x,n)
- C语言问卷调查
- C语言学习008:标准错误
- C语言的知识与能力的自评
- C++模板计数排序
- 如何用命令行编译c++程序
- C语言中的strlen与sizeof的区别