|登录 |注册

查看: 3938|回复: 26
打印 上一主题 下一主题

【求助】简单marks grade 系统的flowchart.. (C++)

[复制链接]
bboycs
2010-6-26 04:17 PM
本帖最后由 bboycs 于 2010-6-26 04:56 PM 编辑



以上是小弟画出来的~不过实在想不到还有什么其他方法了~
所以想请教各位~
多谢多谢~

*(show A)<<是指 char A

外加一题~
这题是完全不会做~
1)        Draw a flowchart to display all the prime numbers below a given number.
e.g. Given 23 then the result should be        2        3        5        7        11        13        17        19
tecklee89
2010-6-26 04:34 PM
Not quite sure about your question.
Anyway, it should contains decisional requirement as we are to compare the input result and to show the relevant grade. Pseudocode:
Variable: score
IF (score>=80 AND score<=100)
THEN show 'A'
IF (score>=70 AND score <=79)
THEN show 'B'
......
END IF
bboycs
2010-6-26 04:43 PM
回复 2# tecklee89


    hello~ thanks for reply~
i just want to make sure my flow chart draw like that whether is  correct o not~
and it is in C++
宅男-兜着走
2010-6-26 04:54 PM
再多一个A != numeric, return 呵呵呵呵呵~
没错。
bboycs
2010-6-26 04:57 PM
回复 4# 宅男-兜着走


    算standard吗?
我的意思是指算正确的 flow chart 吗?
类似一个input一个output~

外加一题
完全不会~
1)        Draw a flowchart to display all the prime numbers below a given number.
e.g. Given 23 then the result should be        2        3        5        7        11        13        17        19
宅男-兜着走
2010-6-26 05:46 PM
回复 5# bboycs

算, 但是图形方面很丑-rf 。。。。
那个 Bool 呵呵呵呵。。。。。

不过很好。

你给的这个找Prime number的。。。。 说实在, 我不会。

但是如果用 愚蠢的方式我做得出。

(两个 Loop , 一个 判断。)

你上Google 看看有什么 Alghoritm 吧。
bboycs
2010-6-26 06:07 PM
回复 6# 宅男-兜着走


    怎样讲两个loop?
Super-Tomato
2010-6-26 07:09 PM
外加一题~
这题是完全不会做~
1)        Draw a flowchart to display all the prime numbers below a given number.
e.g. Given 23 then the result should be        2        3        5        7        11        13        17        19
bboycs 发表于 2010-6-26 04:17 PM



要求 23 内的所有质数,那麼第一當然就是从 2 開始循环至 23
再來就是循环當中再做個判断是否只可以被自己整除


p/s: 确定你知道什么是 prime number 和其性质
bboycs
2010-6-26 07:12 PM
回复 8# Super-Tomato


    显示prime number方法不懂~
只知道只可以被自己一样的号码除~
~Zero
2010-6-26 07:28 PM
关于 prime number 的, 供参考.
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2025-3-11 12:21 AM , Processed in 0.103152 second(s), 25 queries .

Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.

本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved

Dedicated Server powered by iCore Technology Sdn. Bhd.

合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部