Computers & Internet Logo

Related Topics:

Posted on Oct 05, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Need to write a simple (no array allowed) to take three inputs from a user and sort it numerically. Not just provide the MAXNUM. via Javascript

1 Answer

Anonymous

Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

Novelist:

An expert who has written 50 answers of more than 400 characters.

  • Expert 171 Answers
  • Posted on Oct 06, 2009
Anonymous
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

Novelist:

An expert who has written 50 answers of more than 400 characters.

Joined: Oct 05, 2009
Answers
171
Questions
0
Helped
57138
Points
412

In pCode

Var1 = Input1
Var2 = input2
Var3 = input3

If Var1 > Var2 and Var3
Then Var1 is Max
If Var1 > Var2 and < Var3
then Var3 is Max
Else Var2 is Max

If Var1 is Max and Var 2 > Var3
Then Var1 = Max
Var2 = Mid
Var3 = Min

if Var2 is Max and Var >1 Var3
Then Var2 = Max
Var1 = Mid
Var3 = Min

Repeat the various possibilities and you have got your result without arrays

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

I’m trying to create a vlookup formula cell F2 that will look up the merchandise code in E2 and display the name using column K and L. Look for wpexact match

create an additional sheet in worksheet at the bottom of worksheet is a +
add a sheet put each merchandise code in each row going down the column worksheet.
in the next row put the name beside the matching code.
then when finished sort on both columns using the merc, code to sort ascending.

code_lookup1-lcxufp0edjxqrfkkn22ib0r3-5-0.jpg notice in the next picture the addition of $ in the row
this is done to allow you to copy down the formula and leave the reference array the same

code_lookup2-lcxufp0edjxqrfkkn22ib0r3-5-2.jpg look at bottom of spread sheet to see additional sheet being used called code to create the array for the look up. With more array rows just modify the formula to say =lookup(a2,codes!$a$1:$b$200)
lookup will give you a text answer where as vloopup will give a numerical value !


code_lookup3-lcxufp0edjxqrfkkn22ib0r3-5-5.jpg
0helpful
1answer

What ls a alerts.

hi there.
Alert may refer to any of the following:
1. In JavaScript, an alert is a type of "pop-up" message to users of a script. An alert could be anything from notifying the user of an error to saying a short phrase such as "Hi". A JavaScript alert looks similar to the example shown to the right. This alert can be produced by using the JavaScript code shown below.
type="text/javascript">
window.alert("This is an alert!");

Since the window object is a top-level object in JavaScript (when coding for web browsers), this code can be shortened to alert() rather than window.alert(), as shown in the example below.
type="text/javascript">
alert("This is an alert!");

While these are often known for their ability to annoy users (for example, the sending of numerous consecutive alerts), they can also be useful for giving the user information such as instructions for fixing errors in a form field. They can also be helpful to JavaScript programmers as a means of debugging a script. By using an alert message to display values, the programmer can determine where things may be going wrong in a script through the process of elimination.
2. In general, an alert box, also called an alert dialog or alert window. It is a small window that pops up providing information to the user and typically includes an OK button, and sometimes a Cancel button.
Error messages and general information are commonly displayed in alert boxes, as it calls attention to itself and makes the user click a button to hide the message. The Windows operating system, along with third-party applications, and web pages are sources for alert boxes.
....
or go to this link.
What is alerts Google Search
Nov 17, 2017 • Cell Phones
0helpful
1answer

Roman numerals

Book indexing systems likely require such capabilities. That subject is in the realm of Nancy C. Mulvany (writer of 2005's Indexing Books); but good luck on getting a reply from such lofty heights.

Here is a page referring to how to sort Roman Numerals in Word tables: http://en.community.dell.com/support-forums/software-os/f/3526/t/17598900

Here is some code for sorting Roman numerals: http://stackoverflow.com/questions/6507536/how-to-sort-an-array-of-roman-numerals

Similarly, here is a discussion of use of vlookup: http://www.pcreview.co.uk/forums/sorting-data-using-roman-numerals-t2104212.html and also in the following Excel forum:

http://www.excelforum.com/excel-general/397231-sorting-data-using-roman-numerals.html

I doubt you want to use this online alphabetizer which can handle Roman numerals: http://alphabetizer.flap.tv/

Maybe I have misunderstood the question and you are wondering about something else besides sorting. But here is a link regarding some sql server sorting: http://sql.software.informer.com/download-sql-server-sort-roman-numerals/
Jan 21, 2015 • Games
1helpful
2answers

C++ poker program

Hi.

I suggest creating an Array of Cards (cardOne,cardTwo,etc. to five)

If you can enter them in one at a time, after declaring the array, assign the values to the array.

cin < cardOne; (Psuedo code by the way, hope you don't mind)

Afterwards, you'll have an array with 5 cards.

Declare what full houses, flushes, etc would require.
Use an if statement (If you don't mind lots of code) to compare the entered Array against possible hands.

I didn't necessarily give you any specific C++ code. However, if you Google C++ user input, you should find plenty of commands that may help you.

Good Luck

(And not sure about Linear search to be honest, you can use a Linear search, but if you did it the way I explained, you just have to compare hand to a series of conditionals.)


0helpful
1answer
0helpful
1answer

Text box restriction

I hope this helps and thanks for rating my effort...any other questions...shoot em to me....The Fang.

Restricting character input You can use the SetInputTextType command to restrict the characters that the user can enter in the text input dialog box. For example, suppose an application contains an input text field for users to provide a numeric value, such as their age, and that the input text field has the variable name ageVar. To ensure that the user enters only numeric values in the text input dialog box, you could add the following code to your application:
fscommand2("SetInputTextType", "ageVar", "Numeric");
When users open the input text dialog box, they can enter only numeric values in the text fields.
For more information, see SetInputTextType in the fscommand2 function entry in the Flash Lite 2.x ActionScript Language Reference.

0helpful
1answer

I am having a problem with javascript:swap7

Hi, i'm having problems understanding the code for selection sort.

From what i understood the 2 nested for loops keep taking an entry in the array at position i and another entry in the array in position i+1 and comparing them until the the index reaches the end of the array.

i don't understand how do i end up with a sorted list this way.

for instance if i have

5 3 4 1
so after comparing the first two it'll be:
3 5 4 1
then the next two
3 4 5 1
and the last two
3 4 1 5

and then exiting?!

what am i missing ?!
0helpful
1answer
0helpful
1answer

Sorting string and numeric

One simple way to achieve this is using radio button function. Give the user flexibility to change sorting via String or Numeric. As the user clicks on String the result bottom of this option will change the sorting method using String. Otherwise, Numeric.

By the way, please be specific in posting your question. Include the development tools that you use. For example, MS Access 2003.

Regards,
Maha
Not finding what you are looking for?

90 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...