Learning algorithmics with Ada


Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Ada complementary exercises

These exercices are intended for the braves learning algorithmics in Ada. Don't listen to the haters, Ada is pedagogic as hell, Onizuka-style ( you know, the brilliant mind creator of the pedagogic roundhouse kick).

They will cover the basics of algorithmics, instanciated in Ada :

  • Data types
  • Conditions
  • Loops
  • Procedure and Functions

How does this work ?

Below is a demonstration coding exercise. The assignment is the following : The program should display the sentence "Hello World!", and terminate.

Hello world demonstrator
with Text_IO;
procedure Hello_World is
Text_IO.Put_line("Hello World!");
end Hello_World;

To run the example, press the big "Run" button (no shit Scherlock). The ada compiler displays its output in the standard error, and your program in the standard output.

To INSA students: you will notice that the "Acteur" used to print text is Ada.Text_IO, and not GAda.Text_IO.

About the author

I am Nicolas Seydoux, I teach Ada at INSA and developped this series of exercices to complement the course already available. If you want to reach me, here is my personal page : https://nseydoux.frama.io/

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content