今天第一次写博客,刚刚开始学习c++,每天坚持学点;记录点点滴滴。
#include <iostream>
int main()
{
using namespace std;
cout<<"Come up and c++ me some time.";
cout<<endl;
cout<<"you won't regret it!"<<endl;
cin.get();
return 0;
}
#include <iostream>
int main()
{
using namespace std;
int carrots;
cout<<"How many carrots do you have?"<<endl;
cin>>carrots;
cin.get();
cout<<"How are two more. ";
carrots=carrots+2;
cout<<"Now you have "<<carrots<<" carrots."<<endl;
cin.get();
return 0;
}