总结26

来源:互联网 发布:男加厚棉服淘宝 编辑:程序博客网 时间:2024/06/04 18:45

关键词  看书

A学习基础内容

B编写一个代码 一个简单赋值后加上2后的源代码

#include <iostream> 
int main ()
{
using namespace std ;
int carrots;
cout<<"how many carrots do you have? " << endl;
cin >>carrots ;
cout<<"here are two more ";
carrots = carrots+2;
cout<<"now you have "<<carrots<<"carrots. "<<endl;
return 0;
 

C以下是我自己的理解

int 表示输入的类型  cout 后 表示显示的内容

 cin 输入  {} 指函数内容

0 0