Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am stuck on this assignment. I copy the main from Mainch2. I was able to run correctly main, first, fathm_ft. But when I run

I am stuck on this assignment. I copy the main from Mainch2. I was able to run correctly main, first, fathm_ft. But when I run on two_func, all my programs got errors. I could not debug it. I need your help. Thanks for your help!

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

MainCh2 *Chapter2: chapter2.c *Julie Luscomb Aug 2, 2017, 7:34:26 PM * Menu driver for practice C programming files * Each C project must have one - and ONLY one - main) function * The main() function serves as the starting point * Steps to add a practice file: * 1. Right-click Source Files >New - C Source File -> provide name and select 'c' extension. * 2. Write your code. For the chapter practice files, substitute void somename (void) instead of int main(void). Omit the return. Save * 3. Add the prototype definition. *4. Add a menu option * 5. Add a case block. Save *6. Run project. *7. Debug as needed #include //header file for input/output int menu (void); //prototype definition int main(void) int selectionmenu) //variable declaration and initialization via call to menu () //The line above also serves as the 'priming' read for the following while loop while(selection I- 99) // The switch statement is similar to a chained if-else except conditions fall through in CI switch (selection) ( case 1: printf ("herel ") case 2: printf ("AND here!!); breaki case 3: break; default: /* Optional - but a good idea expecially if you have no other error catchingl / printk("Please enter a valid selection. ") selection menu );// get the next menu selection, otherwise, you have an eternal loop! return 0 int menu (void) int choice 10; printf(n" printf(" 1. First In") printf"2. Fathoms to feet In") printf(" 3. Two functions ") printf("99. Exit " printf("Please select number and press enter: ") printf(* ") scanf("%d", &choice); return choice

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

Step: 3

blur-text-image

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

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions

Question

=+5. With whom do you have contracts or agreements?

Answered: 1 week ago