佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 977|回复: 1

想请教大家一下

[复制链接]
发表于 19-2-2008 12:21 AM | 显示全部楼层 |阅读模式
想请教大家一下这几个问题要如何答。谢谢。

1a.explain the differences and the relationship among there algorithm,program and pseudocode.

1c.design an algorithm by using both the pseudocode and flowchart to find the largest number in an (unsorted) list of number.In the proposed algorithm,which part of the algorithm may need the basic construct of sequence,iteration and selection.

谢谢大家的帮忙。因为我是读part time 的,而且是第一次读这个,所以不是很清楚。
回复

使用道具 举报


ADVERTISEMENT

发表于 19-2-2008 06:27 PM | 显示全部楼层
功课也要人帮?

1. algorithm = 算法
2. program = 程式
3. pseudocode = 原始码

到Google找下, what is algorithm, what is program, what is pseudocode.


第二题:答案差不多是这样,到Google找下。

#include <iostream.h>

void main ()
{
int number,max=0; //number hold the input, max holds the largest number

cout<<"This program tells you the largest number among the 10 integers entered."<<endl;
cout<<"Please enter one integer per line..."<<endl<<endl;

for(int count=1;count<=10;count++)
{
cout<<"Number: ";
cin>>number;

if (number >= max)
max= number;
}

cout<<endl<<"The largest number is "<<max<<endl;
cout<<endl;
}
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 24-9-2025 05:12 PM , Processed in 0.124098 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表