文件名称:exercise 5 BUPT
下载1 (2.43kb)
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容来自于网络,使用问题请自行百度
C exercise
Exercise 5: ‘for’ and ‘do … while” repetition statements
1. Write a program which uses a do/while loop to print out the first 10 powers of 2 other than 0 (ie. it prints out the values of 21, 22, ..., 210). Use a for loop to do the same.
2. The constant can be calculated by the infinite series:
= 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 +....
Write a C program that uses a do/while loop to calculate using the series. The program should ask the user how many terms in the series should be used. Thus if the user enters ‘3’, then the program should calculate as being 4 - 4/3 + 4/5.
Exercise 5: ‘for’ and ‘do … while” repetition statements
1. Write a program which uses a do/while loop to print out the first 10 powers of 2 other than 0 (ie. it prints out the values of 21, 22, ..., 210). Use a for loop to do the same.
2. The constant can be calculated by the infinite series:
= 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 +....
Write a C program that uses a do/while loop to calculate using the series. The program should ask the user how many terms in the series should be used. Thus if the user enters ‘3’, then the program should calculate as being 4 - 4/3 + 4/5.
相关搜索: c 语言
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 2019213189-EX05.zip 列表 2019213189-EX05/ 2019213189-EX05/2019213189-EX05-01.cpp 2019213189-EX05/2019213189-EX05-03.cpp 2019213189-EX05/2019213189-EX05-02.cpp 2019213189-EX05/.DS_Store __MACOSX/2019213189-EX05/._.DS_Store 2019213189-EX05/2019213189-EX05-04.cpp
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
