Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Help me, please look at the picture fie, those all three pictures are together. Compile the C program, shouldn't use any high codes, basic simple

image text in transcribed

image text in transcribed

image text in transcribed

Help me, please look at the picture fie, those all three pictures are together. Compile the C program, shouldn't use any high codes, basic simple codes only, as indicated in question.

Goal of this assignment: get familiar with Selection and Loop statements, use of library functions, practice pseudocode, problem solving methodologies, the translation of pseudocode to C program and test C programs. Use bottom up approach when you edit and test your program. Pay also attention to make your pseudo and C-program correct 1. Submission Submit ONE C file and one report in WORD following the new template. 2. Write pscudocode and translate it to ONE C-program for the following problems a. (buildMenu Problem) You must use switch statement and loop statement in your pseudocode and program. (Think about why you select a particular type of loop statement or loop statement idiom to solve this problem.) You will build a simple menu system. Your program will first display the following, called a menu: 0) Check balance 1) Deposit 2) Change Password 3) Transfer money 4) Exit Please type a number from 0 to 4 to select menu item: When a number is input by the user and the number is not 4, you will print the string corresponding to the number and print, in a new line, Press any key to continue your transactions.. Your program will wait until user presses any key on the keyboard. After the user presses some key, your program will display the menu again and repeat the process above. The following is an example screen output of the execution of the program. None courier font phrases are comments. Red is user input. 0) Check balance 1) Deposit 2) Change Password 3) Transfer money 4) Exit Please type a number from 0 to 4 to select menu item: 0 Check balance Press any key to continue your transactionsafter user presses some key Check balance 11 Deposit 2 Change Pasaword. Transter money Exit Please type a number from Your program quits to4 to seleet menu item: 4 If the input number is 4, your program number is not in the range from 0 to 4, you will ignore the input and ask user to type a number again. should terminate. When an input Instead of using"Press any key" you can choose "Press ENTER key"In this case, your maximum grade is 95%. You need to study the following . getchar s a standard LO (input/output to devices) fanction with the following specification (slightly modified from its original specification) Function name: getchar output c: the character on keyboard that is pressed by user It is a good idea to write a small test program to leam how to use this function. You are supposed to be able to use a function onoe you know its specification (in the form ahove). you (your proyram) call getchar and if a user Example. Afer presses the key with letter Bon it, the value of your expression is B' or b' depending on whether the "Caps Lock" is on. .If you decide to use Press any key," after you write your test program using getchar). your program might not behave as you want. In this case, consider the following. o Univinux issues. The keyboard input output is buffered, i.e. your progrum might not get the character immediately after a user presses a key. Usually, the Operating System (OS) will send characters pressed afler an ENTER key is pressed. If you want your program to get the character immediately after the user pressed it, run the following command in your shell (command window or Terminal). You only need to run it once after you first open your shell stty -icanon min 1 o You may have observed that your program "skips" the press any key step although you do have getcharin your program! This is because you may have used scanf earlier which does NOT consume the ENTER key the user used to end the input of the integer. The ENTER will be "passed" to getchar by the OS, which causes your obscrvation that the system does not to wait for you to pressa use getchar) twice with the first one to consume the ENTER key while the second to expect a key pressed by the user. b. Problem 5 in page 96 of the textbook

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students explore these related Databases questions