Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING C# Design (pseudocode) and implement (source code) a program (name it SandClock) that uses nested loops to print out the following shape (sand clock).

USING C# Design (pseudocode) and implement (source code) a program (name it SandClock) that uses nested loops to print out the following shape (sand clock). Note that the full shape can be divided into 2 shapes (upper and lower halves) that are printed after each other using their own separate nested loops. Document your code properly.

Program 2:

USINGC# Design (Pseudocode) and implement (Source Code) a program that asks the user for their height (in inches), weight (in pounds), age and gender. Use loops to validate user input and to continue running for a new user until a sentinel value is entered. Ask them to select their approximate level of exercise each week from the options below, then determine and print their allowed daily caloric intake using their BMR: Female BMR = 655+(4.35 * weight) + (4.7 * height) - (4.7 * userAge ); Male BMR = 66+(6.23 * weight) + (12.7 * height) - (6.8 * userAge); 1. You don't exercise: BMR x 1.2 = Calories Allowed 2. You engage in light exercise one to three days a week: BMR x 1.375 3. You exercise moderately three to five times a week: BMR x 1.55 4. You exercise intensely six to seven days a week: BMR x 1.725 5. You exercise intensely six to seven days a week and have a physically active job: BMR x 1.9 Sample Run 1: Female, 63, 120 lbs, age 32, BMR = 1322.7, Exercise 3, DCA: 2050.18 Sample Run 2: Male, 72, 200 lbs, age 32, BMR = 2008.8, Exercise 4, DCA: 3465.18 DCA = Daily Caloric Allowance

USING C#Program 3: Design (pseudocode) and implement (source code) a program (name it Pattern) that uses nested loops to print out the following pattern. Document your code properly.

USINGC#Program 4: Design (pseudocode) and implement (source code) a program (name it LargestOccurenceCount) that read from the user positive non-zero integer values, finds the largest value, and counts it occurrences. Assume that the input ends with number 0 (as sentinel value to stop the loop). The program should ignore any negative input and should continue to read user inputs until 0 is entered. The program should display the largest value and number of times it appeared as shown below in this sample runs. Document your code and properly label the input prompts and the outputs as shown below. Sample run 1: Enter positive integers (0 to quit): 3 4 5 -9 4 2 5 1 -5 2 5 0 Largest value: 5 Occurrences: 3 times Sample run 2: Enter positive integers (0 to quit): 3 7 5 -4 4 2 -5 5 1 7 0 Largest value: 7 Occurrences: 2 times Sample run 3: Enter positive integers (0 to quit): 2 9 8 -4 8 9 -5 8 9 1 7 7 9 0 Largest value: 9 Occurrences: 4 times

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions