An interesting console program for beginners C ++

I teach an entry-level C ++ programming class. We use only iostream in the class (no GUI). It seems that students are not very happy to print lines and numbers on their console. (Most students have never even used a console before.) It's hard to motivate or convey the excitement of programming by showing lines in their console.

What would be a good and fun console program that can be written by C ++ beginners? Im looking for something feasible with a basic C ++ skill + a little complicated + very interesting, which might encourage students to learn programming languages.

Any comments would be appreciated.

+3
source share
11

undergrad intro, " " C . , , - .

+2

, , .

, , , , ..

, , , , .

( , , , , ..) ( , , , ..).

+3

, ? , .., .

, .

, gui (, ).

+2

, . - . , ProjectEuler . ( , !).

+1

, , ascii.

+1

. , stdin stdout. , - , . . , .

, GNU head tee , , cap, . , 3 , tee'd, stdout. , , 5 .

+1

++, "" "". , - "", .

0

Tower of Hanoi , . , , , , .

0

.

, , . SDL . , - :

int main()
{
   GraphicWindow graphic;
   graphic.setPixel(10,20,GraphicWindow::Red);
   graphic.idle();
}

" drawRect" ..

0

, Lunar Lander. ASCII (, ncurses) , .

, , HP 67, .

, , , ALTAIR 8800, MITS/Microsoft BASIC, , ASCII, .

Hunt the Wumpus .

0

One of my first programming classes had a long homework on implementing a (reduced) exclusive game.

You can use chained lists for a fee. You can use Inheritance for tiles. You need logic to handle player turns.

This was probably the first project I did in CS, about which I could talk about my non-technical friends and arouse some interest.

0
source

Source: https://habr.com/ru/post/1763180/


All Articles