我有一个想要编写一个程序,在两个变量x和y之间给出所有偶数 数的总和,然后显示总和。 包括两者总和中的x和y。 这里的任何人都可以帮助我............?
i have got a quizz to write a programm that gives the sum of all even numbers between two variables x and y and then displays the sum. Include both x and y in the total sum. Any one here can help me............ ?
推荐答案2007-10-18 11:56, zo *** *********@gmail 写道: On 2007-10-18 11:56, zo************@gmail wrote: i有一个quizz写一个程序,给出所有偶数的总和两个变量x和y之间的数字然后显示总和。 包括总和中的x和y。 这里有人可以帮助我............? i have got a quizz to write a programm that gives the sum of all even numbers between two variables x and y and then displays the sum. Include both x and y in the total sum. Any one here can help me............ ?
首先编写一个读入两个整数的程序,然后找出 如何获取你读入的所有数字。然后弄清楚 如何总结所有这些数字。然后排除那些奇怪的。对于 更多信息,请阅读常见问题解答,第5.2节特别相关: www.parashift/c++-faq-lit...t.html#faq-5.2 - Erik Wikstr ?? m
Start by writing a program that reads in two integers, then figure out how to get all numbers between those that you read in. Then figure out how to sum up all those numbers. Then exclude those that are odd. For more information read the FAQ, section 5.2 is particularly relevant: www.parashift/c++-faq-lit...t.html#faq-5.2 -- Erik Wikstr??m
10月18日,10:56,zohaib。 shir ... @ gmail写道: On 18 Oct, 10:56, zohaib.shir...@gmail wrote: i有一个quizz到[...] i have got a quizz to [...]
测验的想法是*你*做的工作
the idea of a "quiz" is for *you* to do the work
写一个程序,给出两个之间所有偶数数的总和变量x和y然后显示总和。 在总和中包括x和y。 这里的任何人都可以帮助我.... ........? write a programm that gives the sum of all even numbers between two variables x and y and then displays the sum. Include both x and y in the total sum. Any one here can help me............ ?NAPSIC(尼克的全能符号指令代码) DEFINE print_sum_evens(INTEGER x,y) INTEGER总和< - 0; FOR FOR IN RANGE(x,y) IF is_even(i) 总和< - 总和+我 结束 结束 打印总额 结束 - Nick Keighley
in NAPSIC (Nick''s All Purpose Symbolic Instruction Code) DEFINE print_sum_evens (INTEGER x, y) INTEGER sum <- 0; FOR ALL i IN RANGE (x, y) IF is_even (i) sum <- sum + i END END PRINT sum END -- Nick Keighley
10月18日,4: 03 pm,Nick Keighley< nick_keighley_nos ... @ hotmail> 写道: On Oct 18, 4:03 pm, Nick Keighley <nick_keighley_nos...@hotmail> wrote: 10月18日,10:56, zohaib.shir ... @ gmail写道: On 18 Oct, 10:56, zohaib.shir...@gmail wrote: i有一个quizz到[...] i have got a quizz to [...]
测验的概念是*你*做的工作
the idea of a "quiz" is for *you* to do the work
写一个程序,给出两个变量x和y之间所有偶数数的总和然后显示总和。 在总和中包括x和y。 write a programm that gives the sum of all even numbers between two variables x and y and then displays the sum. Include both x and y in the total sum.这里的任何人都可以帮助我............? Any one here can help me............ ?
NAPSIC的(尼克的全能符号指令代码) DEFINE print_sum_evens(INTEGER x,y) INTEGER总和< - 0; FOR FOR IN RANGE(x,y) IF is_even(i) 总和< - 总和+我 结束 结束 打印总额 结束 - Nick Keighley
in NAPSIC (Nick''s All Purpose Symbolic Instruction Code) DEFINE print_sum_evens (INTEGER x, y) INTEGER sum <- 0; FOR ALL i IN RANGE (x, y) IF is_even (i) sum <- sum + i END END PRINT sum END -- Nick Keighley
记住我在做什么C ++ with complier VC .....对不起4不说 u
Remember i am woking in C++ with complier VC..... Sorry 4 not telling u that
更多推荐
需要帮助我需要一个程序员
发布评论