do this c programming using while and if statments and switch only and pls explain everything and
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Using c programing Create a program that presents the following menu to the user: 1) Print author info 2) Enter multiplication 3) Enter power 4) Multiplication Table 0) Exit Option 1 prints the author's (your) name and student Id Option 2 asks the user to enter two integers, and then calculates the result of multiplying the two numbers together (you may not use the multiplication operation, or division operation/in your program Option 3 asks the user to enter two integers, and then calculates the first number raised to the power of the second number Option 4 ask the user to enter an Integer, print a multiplication table ranging from 00 to num num When the option is finished, prompt the user to make a new selection. Don't exit until the user enters option 0 Hints: For table: start off just "drawing" a single character such as, then what can you do to make it a row of *s, then how do you make it a grid of 's. Then think about how to use that code for a multiplication table. Consider elementary school math, what is multiplication? It is repeated addition, so you have a base unit of work of adding a value, you then repeat that base unit of work some number of times. What tool do we have that lets us repeat some segment of code? A loop, so use a loop to repeat the step of adding numbers until you have the multiplication result. Example multiplication table with max value 3: 0123 00123 002 46 00369 2 Points Program Compiles 1 Point for Serious Attempt to complete assignment 3 Points Prints Multiplication Table Data 1 Point for Multiplication Header 2 Points to Calculate Multiplication 1 Point to Calculate Power (Ctrl) I Using c programing Create a program that presents the following menu to the user: 1) Print author info 2) Enter multiplication 3) Enter power 4) Multiplication Table 0) Exit Option 1 prints the author's (your) name and student Id Option 2 asks the user to enter two integers, and then calculates the result of multiplying the two numbers together (you may not use the multiplication operation, or division operation/in your program Option 3 asks the user to enter two integers, and then calculates the first number raised to the power of the second number Option 4 ask the user to enter an Integer, print a multiplication table ranging from 00 to num num When the option is finished, prompt the user to make a new selection. Don't exit until the user enters option 0 Hints: For table: start off just "drawing" a single character such as, then what can you do to make it a row of *s, then how do you make it a grid of 's. Then think about how to use that code for a multiplication table. Consider elementary school math, what is multiplication? It is repeated addition, so you have a base unit of work of adding a value, you then repeat that base unit of work some number of times. What tool do we have that lets us repeat some segment of code? A loop, so use a loop to repeat the step of adding numbers until you have the multiplication result. Example multiplication table with max value 3: 0123 00123 002 46 00369 2 Points Program Compiles 1 Point for Serious Attempt to complete assignment 3 Points Prints Multiplication Table Data 1 Point for Multiplication Header 2 Points to Calculate Multiplication 1 Point to Calculate Power (Ctrl) I
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
In a Hopfield neural network configured as an associative memory, with all of its weights trained and fixed, what three possible behaviours may occur over time in configuration space as the net...
-
Consider the trigonometric series a0 2 + X r=1 (ar cos rx + br sin rx) where a0, a1, a2, . . . and b1, b2, . . . are constants and suppose that f(x) is a periodic function of x with period 2. (a)...
-
a. Determine IC and VCE for the network of Fig. 4.115. In Figure 4.115 b. Change β to 120 (50% increase), and determine the new values of lC and VCE for the network of Fig. 4.115. c....
-
Why might a company prefer the adjusted allocation rate approach over a proration approach to under- or over allocated indirect costs?
-
The Tally Billiard Supply Corporation provided the following data related to its inventory at the end of the current year: What are Taily Corporation's ending inventory and cost of goods sold under...
-
Management is considering three alternatives to satisfy an urgent need. Each of the alternatives will completely satisfy the need, so no combinations have to be considered. The first costs, operating...
-
The following information pertains to Kwon Corp. at January 1, 2010. Common stock , $10 par, 50,000 shares authorized, 2,000 shares issued and outstanding $20,000 Paid-in capital in excess of par,...
-
5. Suppose that acts on density operators for Q with Kraus representation () - k=1 Let U M, (C), and define operators = 1, k BkUkjAj. , Show that B,..., B., are also Kraus operators for E. 6. Even...
-
A non air conditioned hotel in Kolkata has declared tariff of Rs. 2,000 per day, including amenities. On 15/12/2017, its bills were as follows - 6. a) Hotel Room - Rs. 2,000, Breakfast - 300. b)...
-
4. Given the following code: a. What is this function called? (2) b. What does the code do? ISR(INT1_vect) { cli(); = PINB 0xAA; cntZero++; sei(); }
-
Wages, Real Business Cycle Theory and the Great Depression. A simple real business cycle explains all economic fluctuations with just technology shocks. During the Great Depression, real wages...
-
15. Write a function CountDigitsAndAlpha that takes a string as input and print the number of digits in the string (i.e. '0', '1', '9') and the number of alphabet characters in the string (i.e. 'a',...
-
According to a sustainable development perspective, what are two of the root causes of our global challenges (select 2) The economy has been the main and often only focus of our societies. We are not...
-
AP Physics 1 Lab: Central Net Force Particle Model Name: Experiment 1: Fnet VS speed list constants (name, value & units) 1. 2. State the proportionality between your independent and dependent...
-
A health care issue that has been in the news lately is the computerization of health records. This possibility is being approached cautiously because of sensitive privacy and security concerns,...
-
On 1 July 2021, Croydon Ltd leased ten excavators for five years from Machines4U Ltd. The excavators are expected to have an economic life of 6 years, after which time they will have an expected...
-
Do Programming Exercise 6 but modify it to get information from a file. The first item in the file should be the number of contributors, and the rest of the file should consist of pairs of lines,...
-
Do Programming Exercise 1 from Chapter 9 but replace the code shown there with an appropriate golf class declaration. Replace setgolf(golf &, const char*, int) with a constructor with the appropriate...
-
Suppose the Fizzle class has only the data members shown: class Fizzle { private: double bubbles[4000]; ... }; Why would this class not be a good candidate for a user-defined move constructor? What...
-
A firm is looking to locate its production facilities in one of two countries. The wage rate in Country 1 is 10 and the cost of capital is also 10 . The wage rate in Country 2 is \(20 \%\) higher,...
-
While processes differ somewhat among the three main manufacturers of cricket balls in international matches, all top-quality cricket balls are handcrafted to exacting specifications and standards....
-
Governments may use, and have used, wage subsidies to reduce unemployment in times of economic recession. For example, from January to August 2009, Mexico provided wage subsidies to certain firms in...
Study smarter with the SolutionInn App