Question about Microsoft Windows Vista Home Premium with Service Pack 1: Windows

1 Answer

Visual basic program for binary search technique

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Brigadier General:

    An expert that has over 10,000 points.

  • Master
  • 10,406 Answers

This sounds like "homework".

A binary-search requires an "ordered" table of values.
Sort your values into the proper order.

LET TOP=1; * Point to first element in the table.
LET BOT=1000; * Point to the *LAST* item in the table.

LOOPHERE:

LET BINARY = 2;

LET MIDDLE=FLOOR((TOP+BOT)/BINARY);

IF VALUE(MIDDLE) = KEY THEN STOP;

IF KEY < VALUE(MIDDLE)
THEN TOP = MIDDLE;
ELSE BOTTOM = MIDDLE;

IF TOP = BOTTOM THEN STOP;

GOTO LOOPHERE;

END;

Posted on Sep 10, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

Can give an example of search command code?in visual basic 6.0


If you click on the following link you will find tutorial of Visual Basic and You will als so find example commands including some examples for parameter searches http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/109244

hope it helpss rick

May 18, 2011 | Operating Systems

1 Answer

How to run vb


How to Run a Visual Basic Program on a PC By an eHow Contributor

Like C++, C Sharp and Java, Visual Basic (VB) is an object oriented programming language. Recently it was integrated to the Microsoft .NET Framework. The .NET Framework is a software infrastructure that speeds up program development. It is supported by the Microsoft Visual Studio Integrated Development Environment (IDE), Microsoft's chief programming environment, and that of SharpDevelop.
Difficulty: Easy Instructions Things You'll Need:

  • Visual Microsoft Studio and .NET Framework
  1. Launch your Microsoft Visual Studio. It is a "heavy" application so depending on how much RAM you have it may take a few minutes to load.
  2. Click the Project tab on the first screen. Notice two buttons at the bottom of the screen named "New Project" and "Open Project." Since the tutorial assumes that this is your first VB program, click the "New Project" button. If you worked on a project before, its name will appear in an area labeled "Open an Existing Project" with a hyperlink that opens the project.
  3. Select "Windows Application" in the "Visual Basic Projects" folder if you intend to run your end program on a computer running a Microsoft Windows operating system. Focus in the "Name" text box near the bottom. Change the name from the default to something more descriptive such as "MyFirstVBProgram." Leave the Location to the default value to save your project to the "My Documents" folder. Press OK.
  4. Concentrate on the grey square area with the arrays of dots. This is the "form." The pinboard shows where components like buttons and text boxes will be installed to make a complete graphic user interface (GUI). The purpose of the grid is to align the components.
  5. Run your program. Click "Debug" from the menu bar. Click "Start" from the drop down menu. Alternatively, you can press F5 on your keyboard.
  6. Enjoy your first Visual Basic program in its simplest form. It is identical to the form in Step 4 except that the dots are gone. What you are looking at is a stand alone program that exists as an ".exe" file having the same name as your project. You can find it under the MyFirstVBProgram folder by default.
  7. Understand the difference between the two distinct environments of the IDE, the Design Environment and the Debug Environment. You saw the Design Environment in Step 4 of this tutorial. That was the environment where you could design a GUI on the form using your mouse. The Debug Environment takes over during the compilation interval in Step 5. That is where you can insert break points in your source code so that you test the correctness of the program.


Read more: How to Run a Visual Basic Program on a PC ' eHow.com http://www.ehow.com/how_2072757_run-visual-basic-program-pc.html#ixzz17b5EMirN

Dec 09, 2010 | Operating Systems

1 Answer

Visual basic 6.0


okay its easy do this click start then go to all programs check all programs untill u come to microsoft visual studio 6.0 follow the right arrow and screw down to microsoft visual basic 6.0 thats it u are done.click ok ok and u are home

Nov 11, 2009 | Operating Systems

2 Answers

Can not find script file cleanvirus vbs


Can not Find. Script File
C:\WINDOWS\System32\CleanViirus.vbs

Oct 22, 2009 | Microsoft Windows XP Professional With...

3 Answers

Visual Basic and SQL


Hi,

Visual Basic 6.0 and MS Sql server 7 or 2000 are highly compatible with each other. VB.net is compatable with sql 2005 which is inbuilt as well.

Jul 07, 2009 | Microsoft Windows Vista Ultimate Edition

1 Answer

I need help in Visual Basic as i am new to the visual basic 6


Dear, the following page contains the tutorial for beginner to visual basic 6, I hope that would be very helpful to you.

http://www.hitmill.com/programming/vb/beginner.html

Best regards.

May 26, 2009 | Microsoft Windows XP Professional

1 Answer

Java code


To call another program from Visual Basic, you can use something like this. So, to call a Java program, the program name would be "java <name of Java program>".

Oct 06, 2008 | Operating Systems

1 Answer

Binary search


Here's a nice article with some examples.

http://www.tbray.org/ongoing/When/200x/2003/03/22/Binary

And another - examples at the end of long boring explanations:

http://en.wikipedia.org/wiki/Binary_search

If you still have problems, tell me what language you're using.

Jul 15, 2008 | Operating Systems

1 Answer

Java


If you don't already know how to program then i wouldn't start with Java but maybe with Visual Basic. Once you have a good grasp of Basic then you can move onto Java.

If you already know how to program in another language, especially C++ then you will find java to be quite familiar.

In any case your first step would be to go to yoru local book store and buy a book or two. Read through the book while at your computer and try all the examples.

For Visual Basic there are books like this: http://www.amazon.com/Microsoft-Visual-Basic-2008-Step/dp/0735625379/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1215519837&sr=8-1 or http://www.amazon.com/Beginning-Microsoft-Visual-Basic-Guides/dp/0470191341/ref=pd_bbs_sr_6?ie=UTF8&s=books&qid=1215519932&sr=8-6 or http://www.amazon.com/Teach-Yourself-Visual-Basic-Hours/dp/0672329840/ref=pd_bbs_sr_9?ie=UTF8&s=books&qid=1215519932&sr=8-9

For Java you may want to check out: http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1215519994&sr=8-1 or http://www.amazon.com/Beginning-Programming-Java-Dummies-Computer/dp/0764588745/ref=pd_bbs_7?ie=UTF8&s=books&qid=1215519994&sr=8-7 or http://www.amazon.com/Sams-Teach-Yourself-Java-Days/dp/0672329433/ref=pd_bbs_9?ie=UTF8&s=books&qid=1215519994&sr=8-9

Jul 08, 2008 | Microsoft Windows XP Professional

Not finding what you are looking for?
Microsoft Windows Vista Home Premium with Service Pack 1: Windows Logo

Related Topics:

470 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Operating Systems Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Scott Fryer

Level 2 Expert

80 Answers

Carlos L. Burgos
Carlos L. Burgos

Level 2 Expert

508 Answers

Are you a Microsoft Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...