Home > Back-end >  Homework assignments 3. Basic application function. Edit, annotations, run, debug their program.
Homework assignments 3. Basic application function. Edit, annotations, run, debug their program.

Time:09-19

Write a menu program to run after the first in the screen display the following menu, when the input value of 1, call display with "& amp;" The patterns of the character representation function application pattern (definition); After input number 2, call display with a "$" character representation of design function program (design) his definitions; Input value after 3 program,
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Menu section *
* 1. The Design (& amp;) *
* 2. The Design ($) *
* 3. The Exit *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

CodePudding user response:

 endFlag=0; 
Do
{
PrintMenu ();
The scanf (" % d ", & amp; Choice);
The switch (choice)
{
Case 1:
The design (' & amp; ');
break;
Case 2:
The design (' $');
break;
Case 3:
EndFlag=1;
break;
Default:
Printf (" input error, please input again \ n ");
break;
}
} while (! EndFlag);

CodePudding user response:

Printf (" please input your choice: ");
The scanf (" % d ", & amp; Choice);

CodePudding user response:

If the two design pattern is different form, perhaps can add cent ~

CodePudding user response:

Ooolinux is keen, praise,

CodePudding user response:

reference 4 floor xinhunter response:
ooolinux is keen, praise,


How do you like my picture?

CodePudding user response:

reference 5 floor u010165006 reply:
Quote: refer to 4th floor xinhunter response:

Ooolinux is keen, praise,


How do you like my picture?

My name is frog studio, with a frog's head, the original,