c++ lesson 一(命名空间输入输出)

//
//  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;
}

 

posted @ 2016-04-06 21:33  小天才努努  阅读(207)  评论(0编辑  收藏  举报