Question

Make an algorithm in the form of a sentence and flowchart from the following cases: a)...

Make an algorithm in the form of a sentence and flowchart from the following cases:
a) Create an algorithm to determine the largest value among three numbers.
b) Algorithm for printing numbers 1 to 10 with instruction do.....while

Homework Answers

Answer #1

a)

ALGORITHM :

Input three numbers from the user
initialize a variable largest with 0
If first number is greater than the other two numbers, then largest is the first number
Else if second number is greater than the other two numbers, the largest is the second number
Else third number is the largest
Print largest.
FLOWCHART :

b)

ALGORITHM :

Initialise i with 1.
While i is less than or equals to 10, print i and increment i
End while loop
FLOWCHART :

Please give an upvote if you liked my solution. Thank you :)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Make an algorithm in the form of a sentence and flowchart from the following cases: The...
Make an algorithm in the form of a sentence and flowchart from the following cases: The trichotomy of real numbers states that, if X and Y are any real numbers, then there are 3 possible relationships that occur between X and Y, namely X = Y, X > Y or X < Y. Create an algorithm to deduce the relationship between X and Y.
draw flowchart of: 1-algorithm that asks the user to enter three numbers and computes and prints...
draw flowchart of: 1-algorithm that asks the user to enter three numbers and computes and prints out the largest number. 2- an algorithm that asks the for an integer N from the user. The algorithm should find whether the number is positive, negative, or ZERO. 3-an algorithm that asks the user to enter a positive integer N. You then need to calculate the sum of all values from 1 to N.
Would the following sentence make sense in terms of the strategy? Make sure to explain in...
Would the following sentence make sense in terms of the strategy? Make sure to explain in detail and with follow-up examples if needed. For follow-up posts, leave another problem for people to determine if it would make sense to use the fundamental counting principle. I wanted to count the number of numbers from 1-100, so I used the fundamental counting principle.
Use the following algorithm: (1) Create three stacks of characters: stk1, stk2, stk3. (2) Read the...
Use the following algorithm: (1) Create three stacks of characters: stk1, stk2, stk3. (2) Read the input infix expression one character at a time and push every character read ( other than ')' ) onto stk1. Do not push the character read if it is ')'. (3) As long as stk1 is not empty, do the following:            Fetch the top character ( call it c ) of stk1 and pop stk1.            if c is an alphabetic character (a-z),...
In this programming exercise you will create an algorithm for solving the following version of the...
In this programming exercise you will create an algorithm for solving the following version of the m Smallest Numbers problem.   Instead of just returning the m smallest values as in homework 1, you want to return a list of the positions where the m smallest values are located without changing the original array. Your algorithm should meet the following specifications: mSmallest( L[1..n], m ) Pre: L is a list of distinct integer values. n is the number of elements in...
Function Example: Write a Python function that receives two integer arguments and writes out their sum...
Function Example: Write a Python function that receives two integer arguments and writes out their sum and their product. Assume no global variables. def writer(n1, n2): sum = n1 + n2 product = n1*n2 print("For the numbers", n1, "and", n2) print("the sum is", sum) print("and the product is", product) ... 1) Create a PYHW2 document that will contain your algorithms in flowchart and pseudocode form along with your screen shots of the running program. 2) Create the algorithm in both...
Create a Flowchart for the following scenario: An invoice is received in accounts payable from the...
Create a Flowchart for the following scenario: An invoice is received in accounts payable from the vendor, where it is matched to the purchase order received from the purchasing department and the receiving report from the receiving department. If the documents match then the information from the invoice is entered into the accounts payable system to update the master files. A payment authorization is then generated with 2 copies. One copy is filed alphabetically with the invoice, purchase order, and...
Evaluate the following cases to determine if they are fair use. Make sure you address all...
Evaluate the following cases to determine if they are fair use. Make sure you address all four points for each case. The four points to consider are: amount and significance of work used purpose and nature of use: commercial vs. non-profit educational nature of the original work: creative vs. factual impact to market of the original work Cases Case 1: A photographer takes a photo of another (living) artist's work and incorporates it into a photographic print that he sells...
Please determine what form of market efficiency is violated by the following anomalies a)Name the three...
Please determine what form of market efficiency is violated by the following anomalies a)Name the three forms of market efficiency according to Fama. Please determine what form of market efficiency is violated by the following anomalies. b)January Effect c)Momentum Strategy (i.e. stocks with high past returns do well in the future) d)Earnings Surprises e)Buying before FOMC meetings (Federal Reserve meetings on interest rates) tends to make money
1- Create a new script that is called HW9.m and save it. The script will do...
1- Create a new script that is called HW9.m and save it. The script will do the following. Test your code for each of the cases and upload your script as a .m file. [15 points] a. Create a random integer numbers that goes from 0 to 5 and assign it to a variable y using rand and round commands. Hint: Note that rand function only creates random number between 0 and 1. You need to scale the values to...