Design a nested program

Assignment Help C/C++ Programming
Reference no: EM13650

Consider the subsequent selection statement, where X is an integer test score between 0 and 100.

input X

if (0 <= X and X < 49)
output "You fail."

else if (50 <= X and X < 70)
output "Your grade is" X
output "You did OK."

else if (70 <= X and X < 85)
output "Your grade is" X
output "You did well."

else if (85 <= X and X < 100)
output "Your grade is" X
output "You did great."

endif
output "How did you do?"

Answer the following:

• What will be printed if the input is 0?
• What will be printed if the input is 100?
• What will be printed if the input is 51?
• What will be printed if the user enters Wingding?
• Is this design robust? If so, explain why. If not, explain what you can do to make it robust.
• How many levels of nesting are there in this design?
• Provide a set of values that will test the normal operation of this program segment. Defend your choices.
• Provide a set of test values that will cause each branch to be executed.
• Provide a set of test values that test the abnormal operation of this program segment.

Reference no: EM13650

Questions Cloud

Determine the mean salary as well as the number of salaries : Determine the mean salary as well as the number of salaries.
Chemical and pharmaceutical science : Write an equation for the formation of an acetal from reaction of excess methanol with benzaldehyde in the presence of an acid catalyst.
Genetic problems : What phenotypic ratio would you get if you crossed a white mouse and a heterozygous brown mouse?
Underperforming economy : Italy is a large European country with a staggering public debt and underperforming economy.
Design a nested program : How many levels of nesting are there in this design?
Write an essay on climate change and the north : Write an essay on Climate Change and the North.
Single transferable vote electoral system : Write a research paper on "Single Transferable Vote Electoral System".
Determine the impact of social media use on student learning : Research paper examines determine the impact of social media use on student learning.
In crisis and reform : Research paper examines the effectiveness of approaches that have been employed to realize correctional objectives, including some relatively recent approaches.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd