computers
posted by su .
How can you write a sorting algorithm for three intergers in simple english terms before it is translated into C?

computers 
MathMate
Do the three integers come in an array or in three distinct variables?
Can you clarify if the sorting algorithm should work for 3 (and no more) or is it a general algorithm that you are supposed to do?
A general one is not much more complicated, but requires the use of forloops. 
computers 
MathMate
For a general sorting using bubble sort (the simplest and the slowest):
N=number of items
A(i)=item i from array A
loop i from 1 to N1
loop j from i+1 to N
if(A(i)>A(j)) exchange A(i) and A(j)
end loop j
end loop i
Respond to this Question
Similar Questions

algebra
consider three consecutive even intergers, the least of which is x. Write a polnomial representing the product of these three intergers.(p+3)(p4)(p3)(p+4) 
8th grade math
the sum of three intergers is 193.The smaller two are consecutive intergers and the larger two are consecutive even intergers.What are the three intergers? 
computers:algorithm
Write a pseudocode to find the average of any amount of positive numbers. 
computers
The recursive algorithm of the 4th Section of the chapter "Computational Geometry" employs a trick of presorting, in which we maintain two arrays X and Y of the input points P sorted on coordinate x and y, respectively. The algorithm … 
Computers
ProblemSolving 1. Develop an algorithm or write pseudocode to determine if a citizen is eligible to vote. The criteria for eligibility are that the citizen must be 18 or older and must not be a convicted felon. The algorithm must … 
computers
Write an algorithm, in English, to solve the following problem. Be sure to include pre and postconditions! 
Math
I am a triangle that has been translated to rest on (1, 1),(1,3), and (2,1). Before translation I was on (2,1) and (2,5). Where is my third vertex before I was translated? 
English
Thank you very much! I still haven't found anything on biodiversity in water. I need to find a website which explains the possible scientific objectives of this type of topic. Remember that the research will be carried out by 17yearold … 
english
Write if the sentence is simple, compound,or complex. 1I'd like to help you ;however,I am very busy today. complex 2Do you know what Willie said.simple 3I think that I've seen that movie before.simple 4The person in the middle … 
computer
Write an algorithm for a program that accepts a set of numbers and finds the smallest among them and computes the sum of the numbers accepted. The program stops when the user enters number 999. Convert the algorithm into flowchart