answersLogoWhite

0

I don't now visual basic, but to determine whether or not a number is even or odd, divide it by two twice, and round once. If the rounded result is equal to the non-rounded result, then the original number is even:

input n

if (n/2.0) == int(n/2.0)

print "the number is even"

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Program to print all the even numbers of an array in visual basic?

find even number in array


Is visual basic a GUI operating system?

Visual basic is not a GUI operating system. In fact it is not even an OS. It is just a platform to develop GUI software for windows using BASIC-like programming syntax.


What is the newest visual basic?

The final supported version was Visual Basic 6.0. Since then (1998~2008?) a langauge called Visual Basic .NET has joined the .NET framework. This is basically a complete redesign/reimplementation of the language for the new framework. Microsoft has even kept the VB version numbers in sequence with the original. The latest version of this language is Visual Basic 2008 (VB 9.0).


How do you make a program in Visual studio To know the number whether its Even or Odd?

using system; { public static void main(string[] args) { int n; n=int.parse(console.ReadLine()); if(n%2==0) console.WriteLine("Even number"); else console.WriteLine("Odd number"); } }


How check if a number is Even or Odd in GW Basic?

85


How do you write a program in Basic to display all the even numbers up to 100?

In visual basic: Module Module1 Sub Main() Dim Inst As Integer For Inst = 0 To 100 Step 2 Console.WriteLine(Inst) Next End Sub End Module


What type of language is visual basic?

basic is a general purpose, high level programming language. and the same is with the visual basic. but the main difference is that, the earlier basic was the dos version language. whereas the visual basic programming language is the language which is not DOS based. but the simplicity in the language remains the same as in basic.


How do you make a program to check remainder is zero or not inGW-BASIC?

So you have a number - "Number" and you need to find if the remainder of dividing it by a number is 0. Number = 3 If Number Mod 2 = 0 then Msgbox("Remainder of 0") End If This function divides by 2 then gives the remainder, this let's you check if a number is odd or even.


What is a software that a programmer uses to write computer instructions?

microsoft visual studio is one. they use programming languages such as c# and visual basic.


State three reasons that visual basic is the most widely used programming language in the world?

Visual Basic is not the most widely used programming language in the world. Aside from anything else, it only works on Windows. Java is the most widely used programming language in the world, closely followed by C++. And there are plenty more languages that are far more widely used than Visual Basic, including C, Python, Ruby and Perl, to name but a few. Even C#, which is also a Windows-only programming language, is more popular than Visual Basic.


Need a'c' program to find given number is even or odd?

No, thanks.


Is Quicken Deluxe complicated?

"Quicken Deluxe has a number of advanced features that can be very complicated to use, however, the basic functionality of the software is quite intuitive and the program can be used basically quite simply by even novice users."