we chose to do 3 diagrams, but only finished two, the directory, which is what this acontinuación, assuming that the person who will find the number, knows the alphabet.
Our diagram starts asking the user if it is directory, because as look for a number in a directory, if not a directory. We complicate it a bit at the beginning, we did not know if the algorithm had to throw you a result to the user, but Dr. Elisa, told us they were just as instructions, or good but rather that he understood.
already with some clear ideas, we begin to do the job and ended up in the following.
DIAGRAM
the pseudocode:
# include
# include
int dir;
main () {
do {do {
printf ("You have a directory? \\ n1." If \\ n2. "No \\ n");
scanf ("% d", & dir);
if (dir == 2)
printf ("Get a directory \\ n");
} while (dir == 2);
printf ("Find the section of the first letter the name \\ n ");
getch ();
printf (" Get the name you are looking identical to \\ n ");
getch ();
printf (" I find it? \\ n1 .- If \\ n2. "No \\ n");
scanf ("% d", & dir);
if (dir == 1)
{printf ("\\ nExiste more than a name like \\ n1. "If \\ n2." No \\ n ");
scanf ("% d ", & dir);
if (dir == 1
dir = = 2)
{printf ("\\ NCOMP full name \\ n");
getch ();
printf ("Dig \\ n1." If \\ n2. "No \\ n");
scanf ("% d", & dir);
if (dir == 1)
printf ("\\ nFelicidades SBEs and use a \\ n");
else printf ("\\ n \\ nThe person is not registered in this directory \\ n" );}
} else {
printf ("\\ nThe person is not registered in this directory \\ n");}
getch ();
clrscr ();
printf ("\\ want to make another appointment? \\ N1." If \\ n2. "No \\ n");
scanf ("% d", & dir);
} while (dir == 1);}
EXAMPLE 1
Start asking if the user directory, as in this case, if available, it usually starts giving instructions to the user to search the phone number you need, by the holder of that line.
When not find the name of the person, informs the user that this itself is not registered in the directory that you are looking for.
are asked if you want to another query, Notec, which is inactive when
given the instruction not want to see another number.
EXAMPLE 2
In this case the user has no board, so the machine is cycled, telling the user to get a directory, and asking if you already have, giving the necessary instructions until the user holds a directory in order to follow the instructions.
Here the user wants to make another query so that you repeat the instructions to find the next number of the person you are looking for.
The program does not end until the person says no need to make another query.
USER-MACHINE INTERACTION IS GIVEN, PRESS ENTER OR ANY ONE POINT AFTER EACH TRAINING AND GIVING NUMBERS ACCORDING TO THE CHOICES ARE GIVEN A CHOICE.
GERMAN GARCIA GABRIELA 1410319
VILLARREAL JUAN MANUEL CASANOVA
1453829 GROUP OF TUESDAY.
0 comments:
Post a Comment