Listing 2: circle0.c
Software Engineering 1: Laboratory Exercises
Copyright
#include <safec.h>
viod Main(void)
{
string_type albums;
string_type name;
boolean_type asking;
put_string("Welcome to mquiz0!\n");
put_string("What is your name?\n");
get_string(name);
put_string("Hello ");
put_string(name);
asking = TRUE;
while (asking)
{
put_string("Here is your question:\n")
put_string("What was the best album of all time?\n");
get_string(album);
if (string_equal(album, "Dark Side of the Moon\n"))
put_string("Yes - you are obviously an expert!\n);
ask = FALSE;
else
put string("No - don't you know *anything*?\n");
}
}