Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 3612|回复: 26
打印 上一主题 下一主题

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

[复制链接]

14

主题

0

好友

156

积分

高级会员

Rank: 3Rank: 3Rank: 3

跳转到指定楼层
1#
发表于 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




收藏收藏0

0

主题

0

好友

13

积分

初级会员

Rank: 1

2#
发表于 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


回复

使用道具 举报

14

主题

0

好友

156

积分

高级会员

Rank: 3Rank: 3Rank: 3

3#
发表于 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++


回复

使用道具 举报

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

4#
发表于 2010-6-26 04:54 PM |只看该作者
再多一个A != numeric, return 呵呵呵呵呵~
没错。


回复

使用道具 举报

14

主题

0

好友

156

积分

高级会员

Rank: 3Rank: 3Rank: 3

5#
发表于 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


回复

使用道具 举报

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

6#
发表于 2010-6-26 05:46 PM |只看该作者
回复 5# bboycs

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

不过很好。

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

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

(两个 Loop , 一个 判断。)

你上Google 看看有什么 Alghoritm 吧。


回复

使用道具 举报

14

主题

0

好友

156

积分

高级会员

Rank: 3Rank: 3Rank: 3

7#
发表于 2010-6-26 06:07 PM |只看该作者
回复 6# 宅男-兜着走


    怎样讲两个loop?


回复

使用道具 举报

7

主题

1

好友

5108

积分

一流名嘴

Rank: 12Rank: 12Rank: 12

8#
发表于 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 和其性质


回复

使用道具 举报

14

主题

0

好友

156

积分

高级会员

Rank: 3Rank: 3Rank: 3

9#
发表于 2010-6-26 07:12 PM |只看该作者
回复 8# Super-Tomato


    显示prime number方法不懂~
只知道只可以被自己一样的号码除~


回复

使用道具 举报

31

主题

0

好友

1228

积分

黄金长老

Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8

10#
发表于 2010-6-26 07:28 PM |只看该作者
关于 prime number 的, 供参考.
http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

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

GMT+8, 2024-7-1 04:59 PM , Processed in 0.160188 second(s), 27 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部