登录
首页 » C++ Builder » ex6

ex6

于 2014-02-04 发布 文件大小:104KB
0 223
下载积分: 1 下载次数: 3

代码说明:

  program that will calculate how many odd integers in a given interval from 1 to N, where N is entered through the keyboard. The program will print out the total number of odd numbers in a given interval as the product of all odd numbers in that interval. As a result, the program should print "at intervals of 1 to N has odd numbers and their product is .".

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 5
    一道程序编译顺序的考题,涉及到函数调用的先后顺序及运算符号的优先级等问题。下面我展开给你讲。 C的程序编译总是从main函数开始的,这道题的重点在“fun((int)fun(a+c,b),a-c)) ”语句。 系统首先要确定最外层 fun()函数的实参,第一个参数的确定需要递归调用fun()函数(不妨称其为内层函数)。内层函数的两个参数分别为x=a+b=2+8=10、y=b=5,执行函数体x+y=10+5=15,于是得外层函数的参数x=15。其另一个参数y=a-c=2-b=-6,再次执行函数体,得最终返回值x+y=15+(-6)=9。 (Compiling together the sequence of test procedures, involving the sequence of function calls and operator symbols, such as the priority problem. Now I give you to start speaking. Procedures for C compiler always start from the main function and at这道题the focus of " fun ((int) fun (a+ c, b), ac)) " statement. System must first determine the most outer layer of fun () function of real parameters, the first parameters of recursive calls required fun () function (may be called the inner function). Inner function separately for the two parameters x = a+ b = 2+8 = 10, y = b = 5, to execute the function body x+ y = 10+5 = 15, then the outer function parameters were x = 15 . Its another parameter y = ac = 2-b =- 6, once again to execute the function body may eventually return the value of x+ y = 15+ (-6) = 9.)
    2009-03-15 15:36:23下载
    积分:1
  • WinSock_2API
    THIS SPECIFICATION IS PROVIDED AS IS WITH NO WARRANTIES WHATSOEVER, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, OR ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE.
    2014-09-01 17:24:43下载
    积分:1
  • POPGENE
    微卫星SSR基本数据分析常用软件,功能比较强大,具有通用性(Microsatellite SSR commonly used basic data analysis software, the function is stronger, is versatile )
    2014-01-21 21:40:10下载
    积分:1
  • C_function_seeking
    学习C的常用工具书,里面包含了常用的函数,您一定用的着的!,希望对您有所帮助!(if you want to study C language well ,you should use this book to help you!)
    2009-12-21 17:01:37下载
    积分:1
  • sr
    说明:  随机共振分析弱信号,带MATLAB源码,值得参考(Stochastic resonance weak signal analysis, take the source code, is worth reference)
    2012-04-26 13:03:45下载
    积分:1
  • thinningPatterns
    thin the pattern of a graph, the input is a 01 matrix, very funny
    2010-06-11 17:13:57下载
    积分:1
  • BinaryIndexedTrees_solved
    树状数组的样例程序,能够解决poj、ural的Stars问题(Tree array sample program that can solve poj, ural Stars)
    2013-05-20 19:09:28下载
    积分:1
  • crrtree-model
    matalab cRrtree code
    2013-05-13 10:17:23下载
    积分:1
  • Client_server-application
    Communication Client_server
    2015-04-06 23:11:58下载
    积分:1
  • ves-master
    VES 3D framework for Windows
    2014-10-22 20:50:25下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载