Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C

51 views
Skip to first unread message

Merve Tektaş

unread,
Mar 16, 2016, 2:05:38 PM3/16/16
to
1. Design an algorithm to print hello world to the screen.
a. Write pseudo code of your solution first. (10 pts)
b. Write the c code for your solution. (20 pts)
2. Design an algorithm that takes an integer value from the user and notifies the user either this number is even or odd.
a. Write pseudo code of your solution first. (20 pts)
b. Write the c code for your solution. (20 pts)
3. (30pts) Write the c code of the algorithm given in the slide 18 of 03.ppt.

Gareth Owen

unread,
Mar 16, 2016, 2:12:53 PM3/16/16
to
Merve Tektaş <mervete...@gmail.com> writes:

> 1. Design an algorithm to print hello world to the screen.

Call echo with the arguments "hello" and "world"

> a. Write pseudo code oef your solution first. (10 pts)

Call "echo hello world"

> b. Write the c code for your solution. (20 pts)

system("/bin/echo hello world");

Wouter van Ooijen

unread,
Mar 16, 2016, 2:44:56 PM3/16/16
to
Op 16-Mar-16 om 7:12 PM schreef Gareth Owen:
This is the c.l.c++, so I assume that for lack of a C++ shell he must
use the C shell ;)

Wouter

red floyd

unread,
Mar 16, 2016, 2:51:40 PM3/16/16
to
1. This is comp.lang.c++, not comp.lang.c, so you are off-topic.
2. The answer to all of your questions may be found at:
https://www.cs.rit.edu/~mjh/docs/c++-faq/how-to-post.html#faq-5.2


Jorgen Grahn

unread,
Mar 16, 2016, 2:58:42 PM3/16/16
to
On Wed, 2016-03-16, Merve Tekta? wrote:
> 1. Design an algorithm to print hello world to the screen.

An odd choice of words, by the way: "algorithm" normally means roughly
"a practical way of implementing a mathematical function". The
function here is little more than a constant:, "hello world".

> a. Write pseudo code of your solution first. (10 pts)
> b. Write the c code for your solution. (20 pts)

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Juha Nieminen

unread,
Mar 17, 2016, 6:51:23 AM3/17/16
to
Merve Tekta?? <mervete...@gmail.com> wrote:
> 1. Design an algorithm to print hello world to the screen.

Can that even be called and algorithm? Do you even know what an
algorithm is?

--- news://freenews.netfront.net/ - complaints: ne...@netfront.net ---

Jorgen Grahn

unread,
Mar 17, 2016, 5:25:16 PM3/17/16
to
On Thu, 2016-03-17, Juha Nieminen wrote:
> Merve Tekta?? <mervete...@gmail.com> wrote:
>> 1. Design an algorithm to print hello world to the screen.
>
> Can that even be called and algorithm?

Didn't I cover that yesterday?

> Do you even know what an algorithm is?

The sad part is that the guy who wrote the exercise (and possibly gets
paid to teach this stuff) doesn't seem to know.
0 new messages