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

C++ 学习(第一天)

2016-02-14 09:24 323 查看
1.函数命名规则: 动词+ 名词

int  Founction1(int  ncount)

{

    int i = 0;

    int nRet = 0;

    

    for ( i = 1; i < ncount +1; i++)

    {

        nRet += i;

    }

    

    std::cout<<nRet<<std::endl;

    return 0;

}

int main(int argc,const
char * argv[]) {

    // insert code here...

    std::cout <<"Hello, World!\n";

    int nTempCount =
100 ;

    Founction1(nTempCount);

    return 0;

}

变量命名规则

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