Write 3 short program segments that input Num, then display Yes if Num == 1, display No
Question:
Write 3 short program segments that input Num, then display "Yes" if Num == 1, display "No" if Num == 2, and display "Maybe" if Num == 3. Implement this program segment by:
(a) A sequence of If-Then statements
(b) Nested If-Then-Else statements
(c) A Case statement
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 54% (11 reviews)
a b c If Num 1 Then ...View the full answer
Answered By
Mugdha Sisodiya
My self Mugdha Sisodiya from Chhattisgarh India. I have completed my Bachelors degree in 2015 and My Master in Commerce degree in 2016. I am having expertise in Management, Cost and Finance Accounts. Further I have completed my Chartered Accountant and working as a Professional.
Since 2012 I am providing home tutions.
3.30+
2+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
You are finishing up your first year of work in the real world. Budgeting is becoming second nature. You've budgeted for regular maintenance for your vehicle. You've chosen to have your oil changed...
-
Write a program that asks the user to input a vector of integers of arbitrary length. The program then counts the number of elements, the number of positive elements, and the number of negative...
-
Write a program that implement a parallel-form realization based on transposed direct form II second-order modules.
-
Problem A (20 points): Loco Farms Company sold 36,000 units of its only product and incurred a $18,672 loss (ignoring taxes) for the current year as shown here. During a planning session for year...
-
The soft landing of a lunar module descending on the moon can be modeled as shown in Figure P3.8. Define the state variables as x1 = y, x2 = dy/dt, x3 = m and the control as u = dm/dt. Assume that g...
-
Suppose three people enter a total of nine horses in a race. Bob enters two, Jane enters three, and Kate enters four. If each horse has an equal chance of winning, what is the probability that one of...
-
Conduct the following analyses for the Internet usage data given in Applied Problem 11-18 in Chapter 11. a. Find the simple correlations between the following sets of variables: Internet usage and...
-
In January, gross earnings in Yoon Company totaled $90,000. All earnings are subject to 8% FICA taxes, 5.4% state unemployment taxes, and 0.8% federal unemployment taxes. Prepare the entry to record...
-
Campbell's Toy Co . purchases toys from a local manufacturer. Scooters have been the Company's best selling toy. During the Company's first year of operations, the following scooter purchases were...
-
Students measured the concentration of HCl in a solution by titrating with different indicators to find the end point. Is the difference between indicators 1 and 2 significant at the 95% confidence...
-
Evaluate the following expression, given that A = 1 and B = 3. Your answer will either be true or false. B^3 % A > B^3 * A
-
Write a program segment that inputs a number X and does all of the following: a. Displays the reciprocal of its square root, 1/Sqrt(X), if X > 0 b. Displays "Error: Division by zero", if X = 0 c....
-
Pagnol-Carrelages SNC is a small distributor of marble tiles. Pagnol-Carrelages identifies its three major activities and cost pools as ordering, receiving and storage, and shipping, and reports the...
-
Calculate values for the equation \(y=2^{-x^{2}}\) and compare with the standard normal curve in Problem 58. List some similarities and some differences. Data from Problem 58 The equation for the...
-
Hold down is another distance-vector loop avoidance technique, whereby hosts ignore updates for a period of time until link failure news has had a chance to propagate. Consider the networks in Figure...
-
Suppose that one byte in a buffer covered by the Internet checksum algorithm needs to be decremented (e.g., a header hop count field). Give an algorithm to compute the revised checksum without...
-
Give forwarding tables for switches S1S4 in Figure 3.44. Each switch should have a default routing entry, chosen to forward packets with unrecognized destination addresses toward OUT. Any...
-
It is possible to define flows on either a host-to-host basis or a process-to-process basis. (a) Discuss the implications of each approach to application programs. (b) IPv6 includes a FlowLabel field...
-
The following items are accounts on Smith's balance sheet of December 31, 2012: Taxes Payable Accounts Receivable Notes Payable, 9%, due in 90 days Investment in Bonds Capital Stock Accounts Payable...
-
What are some of the various ways to implement an awareness program?
-
In Figure 10.22, assume we have 100 packets. We have created two sets of packets with high and low resolutions. Each high-resolution packet carries on average 700 bits. Each low-resolution packet...
-
Using the ideas in the previous two problems, we can create a general formula for correcting any number of errors (m) in a codeword of size (n). Develop such a formula. Use the combination of n...
-
Assume we want to send a dataword of two bits using FEC based on the Hamming distance. Show how the following list of datawords/codewords can automatically correct up to a one-bit error in...
-
A 7 5 kg cliff - diver is falls from a height through the air head, diving towards the water. The drag coefficient for the diver is 0 . 8 3 and the area of the descending diver is 0 . 2 1 m ^ 2 ....
-
In the automobile industry, the dimensionless drag coefficient and the area of the vehicle are often combined into one variable - the drag area whereby the drag area is the product of the...
-
When you drop 10 pebbles into the well, you record the times for hearing the splash as 2.94 s, 3.11 s, 3.12 s, 2.97 s, 3.12 s, 2.97 s, 3.06 s, 3.21 s, 3.37 s, and 3.53 s. (a) Find the average time...
Study smarter with the SolutionInn App