您的位置:首页 > 编程语言 > C语言/C++

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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: