Question about Operating Systems

1 Answer

Find largest number given three numbers in visual basic

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points


    An expert that got 10 achievements.


    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Master
  • 781 Answers

Enter a;
enter b;
enter c;
if a>=b and a>c
print "a is the greatest number"
then if b>=a and b>c
print "b is the greatest number"
then if a=b and a=c
print "a, b, c are equal"
if not print "c is the greatest number"

this is pseudocode.. or my drunken attempt to remember pseudocode... but I think the logic could work.

Posted on Nov 27, 2008

Add Your Answer

Uploading: 0%


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



Related Questions:

1 Answer

How can i display an even number if i enter an odd number in visual basic 6.0

To display an even number when an odd number is entered you can add 1.
n= val(text1.text) 'Take the value of n from the textbox.
If n mod 2 =1 then 'If n is an odd number n=n+1 'You make it an even number end if
text2.text = n 'Display it in another textbox.

Please give a good rating to this answer so that I will be encouraged to support people like you having problems with VB6.

Sep 22, 2011 | Operating Systems

1 Answer

How to install or download the Visual Basic 6.0?

<a href=""></a><br /><br /><br />go to the above given link and download the file,<br />if its compressed extract it, and run the setup.<br /><br />hope this one helps you out.....<br /><br />

Aug 29, 2010 | Microsoft Operating Systems

3 Answers

9999555533331111 out of these numbers any 6 numbers total is 21? how

this would be explained on the basis of two FACTS below.......
sum of two odd numbers are always even and
sum of to even numbers are also always even

then how 6 odd numbers (consider 3 pairs, 9 5 3 1 being odd numbers) can make an odd number 21..!!
Make your basics strong...

Aug 14, 2010 | Operating Systems

3 Answers

I lost the product key and i need product key to activate windows right now

Check the product pack, copy all the serial numbers you see. Then call microsoft support via the phone numbers given. Once you quote these numbers, they give you instructions.

Mar 18, 2010 | Microsoft Windows Vista Home Basic for PC

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 ok ok and u are home

Nov 11, 2009 | Operating Systems

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.

Best regards.

May 26, 2009 | Microsoft Windows XP Professional

1 Answer

Program of c to find largest and second larhest number of given 50 numbers using array

This code generates some random number to test.

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{ findLargest();
return 0;

int findLargest()
{ int someNumbers[50];
int i;

// to generate some numbers for us to test
for(i=0; i<50; i++)
// generate a random number between 0-100
someNumbers[i] = rand() % 100;

// for keeping track of numbers, set as smallest possible
int largest = INT_MIN;
int largest2 = INT_MIN;

// go through each item in the array
for(i=0; i<50; i++)
{ // if bigger than our previous max, set as new max
if (someNumbers[i] > someNumbers[largest])
largest = i;
// if it's not been set as new max, and is bigger than current 2nd largest
else if(someNumbers[i] > someNumbers[largest2])
largest2 = i;

// for printing all numbers in the array
printf("%d | %d\n",i, someNumbers[i]);

// print largest numbers and their position in the array
printf("largest %d (pos %d).\n2nd largest %d (pos %d)",

return 0;


May 07, 2009 | Operating Systems

1 Answer

I have a problem

This is a common starter challenge in college and high school programming classes. While i'm not willing to code it for you, I can show you the methods you'll need to understand in order to approach the problem. The easiest way of doing this is by using a brute force method. Just keep testing the number to see if the remainder after dividing it with a number lower than it is zero. If so, it's a factor.
For example, If the number is 35 then pick a number just one lower than it that's not the number 1. Now divide the two numbers. 35/34 = a number with many decimal places after it, which means its not one of the factors of the number. However, eventually, you'll approach the number 7, and 35/7 = 5. This number has no decimal, meaning it IS a factor of 35, and also the largest non-zero factor of 35. Your algorithm can now stop, since it found the largest non-zero number.
Here's some pseudo-code:
int largestfactor(int number) {
int temp = number;
for(temp - 1; temp>=1; temp--) {
if (number % temp == 0) return temp
return temp
Something like that, with some bug tweaks will do it. The "%" sign is called a modulus. It's a standard c++ operator. Good luck, and remember to vote Fixya if you liked it.
The wikipedia article that helps you with better and more effecient algorithms can be found here.

Sep 15, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

128 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

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

Answer questions

Manuals & User Guides