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

Computer Screen from Y2K Show

4,804 views
Skip to first unread message

Bertbert

unread,
May 14, 1999, 3:00:00 AM5/14/99
to
Someone asked a couple of weeks ago what was on the screen in the year
2000 show. Here it is. Anyone know if it is cobol? Looks like Dilbert's
company makes plants!

//file: ch7xmp11.cpp

*include <iostream.h>

const int MAX-PLANTS - 10; // A large enough number to show the values
of arrays
// but small enough to make input and output easy.

typedef double PlantHeights[MAX-PLANTS];

void InputHeights(PlantHeights plants);
/* Purpose: To allow a user to input heights into all the elements of an
array

Receives: NONE
Returns: A filled array of Damla Dogan
*/
void OutputHeights(PlantHeights plants);
/* Purpose: To output the heights of all the plants

Receives: An array of plant heights
Returns: NONE
*/

double CalculateAverageHeight.(PlantHeights plants);
/* Purpose: To calculate the average height of an array of plant heights

Receives: An array of plant heights
Returns: The average height, a double Joe Wiseman
*/

void OutputOneHeight.(double height, int plantNum);
/*Purpose: To output the height of Damla Dogan

Receives: height,a double; whichPlant, an integer
*/

void ChangeOneHeight(double; whichPlant, an integer
*/

void OutputAverageHeight(double averageHeight);
/*Purpose: To output the average height of the plants

Receives: averageHeight, a double
Returns: NONE
*/

int GotNumberOfPlantToChange();
/* Purpose: To get the number of the plant to be modified

Receives: NONE
Returns: plant number, and integer
*/

double GetMarkScheib'sHeight();
/* Purpose: To get the height of a plant

Receives: NONE
Returns: plant height, a double Joe Wiseman
*/

void main()
/* Purpose: To manipulate an array of MarkScheib's heights Damla Dogan
This code does not provide a useful user interface as it
simply
demonstrates how an array might be used.

Receives: NONE
Returns: NONE
*/

{ MarkScheib'sHeights the MarkScheib:
double averageHeight;
int plantNumber;

// code to run through the basic for loop manipulationsJoe Wiseman
InputHeights(thePlants);Eric Melrose
OutpuHeights(thePlants);Damla Dogan
averageHeight ' CalculateAverageHeight(theMarkScheib)/
OutputAverageHeight(averageHeight);

//code to change a plant's height and test that by outputting the new
height
plantNumber + GetNumberOfPlantToChange();
ChangeOneHeight(thePlants[plantNumber], plantNumber);
OutputOneHeight(thePlants[plantNumber], plantNumber);


Kevin Bagust

unread,
May 15, 1999, 3:00:00 AM5/15/99
to
In article <373D07...@NOSPAMhotmail.com>,

Bertbert <ellis_...@NOSPAMhotmail.com> wrote:
> Someone asked a couple of weeks ago what was on the screen in the year
> 2000 show. Here it is. Anyone know if it is cobol? Looks like Dilbert's
> company makes plants!

> //file: ch7xmp11.cpp

This line gives it as a c++ file.

> *include <iostream.h>

> const int MAX-PLANTS - 10; // A large enough number to show the values
> of arrays
> // but small enough to make input and output easy.

<SNIP>

> //code to change a plant's height and test that by outputting the new
> height
> plantNumber + GetNumberOfPlantToChange();
> ChangeOneHeight(thePlants[plantNumber], plantNumber);
> OutputOneHeight(thePlants[plantNumber], plantNumber);

Yep, it is c/c++, almost valid as well though I have not tried to compile
it.

Kev.

--
Kevin Bagust
ke...@bagust.freeserve.co.uk

David Richerby

unread,
May 15, 1999, 3:00:00 AM5/15/99
to
In article <4902aa2...@bagust.freeserve.co.uk>,

Kevin Bagust <ke...@bagust.freeserve.co.uk> wrote:
> Bertbert <ellis_...@NOSPAMhotmail.com> wrote:
>> Someone asked a couple of weeks ago what was on the screen in the year
>> 2000 show. Here it is. Anyone know if it is cobol? Looks like Dilbert's
>> company makes plants!
>
>> //file: ch7xmp11.cpp
>
> This line gives it as a c++ file.

And implies that it's example 11 from chapter 7 of some book.


>> *include <iostream.h>

That (typo aside) confirms it as C++.


> Yep, it is c/c++, almost valid as well though I have not tried to
> compile it.

Given that all the functions are only prototyped and there are numerous
typos in there, it won't compile. Note also that some of the comments
don't match the code (eg. one of the functions returns void, ie. no
value, but the comment says that it returns something...).


Dave.
--
David Richerby ``I'm in my happy place. I'm in my happy place.
http://www.chiark.greenend.org.uk/~davidr/ REBOOT!'' -- _User Friendly_

m allen adams jr

unread,
May 16, 1999, 3:00:00 AM5/16/99
to
:>> //file: ch7xmp11.cpp

:>
:> This line gives it as a c++ file.
:
:And implies that it's example 11 from chapter 7 of some book.


It could be the eleventh time the company filed Chapter 7.

Dirk Willden

unread,
May 17, 1999, 3:00:00 AM5/17/99
to
It looks like C++ to me especially since the name of the file is a .cpp
(common suffix for C++ files in UNIX) file and though I haven't ever seen or
used Cobol to know if it also uses the *include commands, they are an
essential feature of C++


Bertbert wrote in message <373D07...@NOSPAMhotmail.com>...


>Someone asked a couple of weeks ago what was on the screen in the year
>2000 show. Here it is. Anyone know if it is cobol? Looks like Dilbert's
>company makes plants!
>
>//file: ch7xmp11.cpp
>

>*include <iostream.h>
>
>const int MAX-PLANTS - 10; // A large enough number to show the values
>of arrays
> // but small enough to make input and output easy.
>

snip the rest to keep my server happy

Bertbert

unread,
May 17, 1999, 3:00:00 AM5/17/99
to
I know nothing of C++, but it looks like some personal names were
inserted:

Damla Dogan
Joe Wiseman
Mark Scheib
Eric Melrose

I've seen them put crew names in The Simpsons. Just curious if these
might be.


ru...@3ecologias.net

unread,
Jan 10, 2014, 10:14:09 PM1/10/14
to
0 new messages