首页编程语言c语言编程题库

c语言编程题库

cysgjjcysgjj时间2024-02-26 08:32:54分类编程语言浏览42
导读:用C语言编写程序,计算s=1+(1+2 +(1+2+3 +…+(1+2+3+…+n ?用C语言编写程序,计算s=1+(1+2 +(1+2+3 +…+(1+2+3+…+n ?#includeusingnamespacestd;intmain( {intn;staticintsum=1;cout<<"……...
  1. 用C语言编写程序,计算s=1+(1+2)+(1+2+3)+…+(1+2+3+…+n)?

用C语言编写程序计算s=1+(1+2)+(1+2+3)+…+(1+2+3+…+n)?

#include

usingnamespacestd;

intmain()

c语言编程题库
图片来源网络,侵删)

{

intn;

staticintsum=1;

c语言编程题库
(图片来源网络,侵删)

cout<<"请输入N:"<<endl;

cin>>n;

for(inti=1;i<=n;i++)

c语言编程题库
(图片来源网络,侵删)

{

[免责声明]本文来源于网络,不代表本站立场,如转载内容涉及版权等问题,请联系邮箱:83115484@qq.com,我们会予以删除相关文章,保证您的权利。转载请注明出处:http://www.wnpsw.com/post/6342.html

来源图片网络
罗湖科技创新局-罗湖科技创新局吴琼 互联网技术应用教育:互联网技术基础知识与应用技巧