C program assessment

User Generated

Nyvzh9

Engineering

Description

please see the attachment in order to know what are the requirements. you should work on the C program, all what you have to do is to type the requirements in the C program , they are really easy

Unformatted Attachment Preview

ECE 102 Assignment #18 Using a while loop to solve an inequality Write a program to calculate the maximum n that satisfies the following inequality total  1  2  3      n Your program should prompt the user to enter total. The while loop repeatedly calculates the sum on the right-hand side while increasing n (starting from 1) and checks if the running sum satisfies the inequality. The loop should stop if the inequality is false. Depending on how the loop is written, the last value of n when the loop stops will be the final answer or be 1 off of the answer. Pre-lab assignment 1. Write down an example output first. This is a hand example as required in step 3. 2. Find an example in the notes to use as a reference. 3. Write down the first two steps of problem solving. 4. Trace the while loop. ECE 102 Assignment #19 Write a program that simulates the play of one turn in the game of pig. At the end of the turn, the score for the turn should be displayed. Prelab: 1. Write down the first two steps of problem solving for one turn. 2. Write a detailed pseudocode. Hint: a running sum is needed to in order to get the score for the turn. Review the notes on how to calculate a running sum. 3. Trace the pseudocode with random values that you pick. Do this twice. One trace should be terminated by user input of ‘n’, the other trace by letting the dice = 1. 4. Try your best to fix the pseudocode to make sure that it works correctly before writing the program.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Uploaded wrong versions. Use these instead.

/*
Ali Almusallam
This program calculates the maximum integer n such that the su...


Anonymous
Really helped me to better understand my coursework. Super recommended.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags