Simple Script To Output Divisors Of A Positive Integer

Aug 30, 2009

The console application needs to input a positive integer and output its proper divisors.[code]

View 2 Replies


ADVERTISEMENT

Output Divisors Of A Positive Integer?

Aug 30, 2009

how I could go about doing it. The console application needs to input a positive integer and output its proper divisors.

[Code]...

View 17 Replies

Show Positive Symbol For Integer?

Feb 15, 2009

How do I have a positive number show the "+" sign before the number.

I feel that this should be easy but my searches must be too broad because I get way more info than I want and don't seem to find the easy fix.

View 3 Replies

Test An Integer Value To See When It Is Positive / Negative?

Sep 18, 2009

I am looking for a way to test an integer value to see if it is positive or negative so I can perform the required actions.

View 1 Replies

VB Program That Requests A Positive Integer As Input?

Nov 28, 2009

i did this much but something doesn't seem right...the question is A Visual Basic program that requests a positive integer as input, and carries out the following steps:If the number is even, divide it by 2.Otherwise, multiply the number by 3, and add 1 to the result. Repeat this process with the resulting number, and continue repeating until the number 1 is reached.After the number 1 is reached, displayed how many iterations were required to reach the number 1. (Hint: a number is even if number Mod 2 = 0.)

Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
Dim num, multiply, divide As Double

[Code]...

View 4 Replies

Develop An Application Which Accepts A Positive Integer Value From The User?

Nov 8, 2011

develop an application which accepts a positive integer value from the user and outputs the sum of all integers between 0 and the given integer.

View 7 Replies

Convert Positive And Negative Math.Sin (waveform Output Values) Into (unsigned) Byte Array?

Apr 19, 2011

I'm creating an emulator for a device to simulate wave forms. My challenge is that when I try to convert the output of the following code, I can't convert the Math.Sin's double output into byte values that lend themselves to the byte array format required by an existing graphing control as listed at bottom below. I''m not sure how to handle this when the sin function creates negative values but the byte values will need to be positive and basically 'shifted up' so that anything over 127 is negative. (0 - 255) unsigned. BitConverter.GetBytes has been suggested but THIS is the result of that attempt.

[Code]....

View 2 Replies

Asp.net - Big Negative Number - Positive Giving Positive Only?

Apr 15, 2011

I have temp2 value -52340.0 and hslColor.Luminosity is 240.0 When Dim temp1 As Double = (hslColor.Luminosity - temp2). It shoud give -ve number but I am getting always positive number. results should nbe -52100, but I am getting +52100. How to handle this?

View 4 Replies

Let Textbox1 Only Enter Positive Whole Numbers And Positive Decimal Numbers?

Jan 10, 2012

How to let textbox1 only enter positive whole numbers and positive decimal numbers

View 4 Replies

Simple Forms With Rich Text Output?

Apr 6, 2010

I have absolutely zero coding experience and my background is non-IT. I'm however trying toy friend who also shares the same non-coding skillset as mine her automate some of her work but building a simple form that takes a bunch of input (drop down, check boxes, radio buttons, rich text boxes etc) and outputs it to the a word or rtf file. Is this possible?

View 14 Replies

.net - Simple Iteration Through An Integer-type Enum?

Apr 30, 2009

I have the following Enum:

Public Enum myEnum As Integer
first = &H1
second = &H2

[Code].....

Obviously I can code around this issue, but I can see a scenario where that workaround could be easily missed in maintenance programming, and I'm hoping someone can recommend a simple solution that won't break if, for example, the values in the enum have to change at a later date.

View 5 Replies

Get Values From A IList(Of T) And Output To A Listbox'Dim J As Integer?

May 28, 2012

i am having trouble displaying the values i get from an IList(Of T) and displaying that in a listbox found on another form. I have used a for loop to get the values from the IList, then i can display that in a msgbox. for eg:

Dim j As Integer
Dim path As String = ""
For j = 0 To best_tour.Count - 1

[code]....

best_tour is ot type IList() path keeps the name found in the list everything works fine inside the loop..but it does not populate the lst_output listbox.I have tried using files, but in vain. It just get the values from the list but does not display that on the listbox.If that can help, then listbox is found in a panel on the form2, but taking it out of the panel does not affect anything.

View 7 Replies

Populate An Simple Integer Array With Variable Of The Same Type?

Aug 9, 2012

I know vb.net does not include pointers like C language. but I am trying do populate an simple integer array with variable of the same type for example :

dim variable1 as integer = -1
dim variable2 as integer = -1
dim intArray() as integer = {variable1,variable2}

[code]....

it is a very simplyfied verson of what I want to do.I want to change the value of ma variables with my array referencing them with an index as if my variables were pointers of integer in c++ for example so that normally after the example, both variable should hold the number 3 instead of the number -1?

View 3 Replies

Convert Integer To Currency Format To Output In Textbox?

Feb 11, 2011

I have a textbox that is filled by the method [code]...

View 3 Replies

Create A Simple Times Table Program Which Will Allow User To Enter An Integer Value

Jan 22, 2010

could anyone please help me with this1.Create a simple Times Table program which will allow the user to enter an integer value n (between 1 and 20) into a textbox. On the click of a button output to a label the n times tables. Use a For Next loop to perform the repetition.i can output them to a list box but only last one to a label ive been stuck for 3 days.

View 8 Replies

Find All The Divisors Of A Number That Leave No Remainder?

May 10, 2010

Is there an efficient way to find all the divisors of a number that leave no remainder? And by efficient, I don't mean dividing a number by every other number to see if the remainder is zero.

View 3 Replies

Convert Negative Integers To Positive Ones?

Jun 22, 2011

I need to convert a negative integer to a positive one.

View 14 Replies

Convert Positive/negative Number?

Dec 19, 2005

Is there a built-in function in .NET (VB) to convert a negative number into a positive, and vice-versa?I usually end up just using:NegNum = PosNu - (PosNum * 2)PosNum = NegNum- (NegNum * 2)

View 6 Replies

Disable In Textbox Has Anything Else Besides Whole Positive Integers?

Jun 12, 2009

For the life of me, I cant seem to do this. In the textbox_textchanged method, I want Button to disable in textbox has anything else besides whole positive integers.If text box has positive integers, i want button1 to enable.

View 6 Replies

Positive Decimal In Datagridview Columns?

Jun 1, 2011

How to set in datagridview column to force it only accept positive decimal value??

If negative , then raise dataerror event??

View 4 Replies

Round To Half, Always In Positive Direction?

Aug 25, 2011

How do I achieve the below rounding?

0.012608376 > 0.015
2.1 > 2.5
2.4 > 2.5

[code].....

View 3 Replies

Possible In An Datagridview To Use Different Formatting For Negative, Positive And Zerovalues?

Jan 19, 2009

Is it possible in an datagridview to use different formatting for negative, positive and zerovalues?I want to show positive numbers in black, negative numbers in red, and zero-values hidden.

View 2 Replies

Textbox Maxlength For Positive / Negative Integers

Apr 25, 2012

The problem is simple: I have a form with textboxes, and in one of those textboxes, I want users to enter either a positive or negative 2-digit number. I'm looking for an easy way to enforce this restriction, i.e. without having to parse the number and check whether its absolute value is below 100.

[Code]...

View 2 Replies

C# - Format Double As String With Positive / Negative Symbol?

Aug 25, 2011

I'm outputting a Double that can be either (+) or negative (-). If the number is a negative the symbol (-) is included automatically, is there a way to do this for positive numbers as well?

The only (horrible) way I can do this is :

If MyNumber <= 0 then
string.Format("{0:0.00}", MyNumber)
Else
string.Format("+{0:0.00}", MyNumber)
End If

View 2 Replies

Random Numbers To Display Both Negative And Positive Integers

Feb 28, 2012

I have written a program that generates and prints 10 random integers from -10 to 10, my problem is that I am returning both negative and positive numbers, aligned right with a pad of 2, but the negative is on the right hand side of my number instead of the left. here is my code, all work but I need to align the numbers and have the correct notation of negative.

[Code]...

View 3 Replies

Textbox Validation - Allow Positive Numbers And Decimal Point?

Sep 9, 2011

What would be the code to validate a textbox so that it can only accept positive numbers and a decimal point? If no value is entered, it automatically enters 0.

View 1 Replies

Post A Simple Code Using VB That Start Building Simple Games?

Jun 10, 2011

Is there anyone can post a simple code using vb,that start building a simple games ?

View 2 Replies

No Output In Asynchronous Program - Retrieve Output After The Events Are Invoked?

Mar 1, 2012

What I am trying to do: There are three powershell scripts with different time delays as shown below.I am trying to run them asynchronously in .NET and I followed this article to implement Asyncrhonous programming. Where I am stuck:The I am not able to retrieve output after the events are invoked.The scripts are being called but then the program ends and it shows "Press any key to continue" in console windows.I don't what I am missing here.

Info: JobRequest is a class that I use to pass around information keep track of jobs.

Sub Main()
OurAsyncFunctionCalling("psDelayScript2.ps1", "-arg1 4 -arg2 5", 1)
OurAsyncFunctionCalling("psDelayScript1.ps1", "-arg1 2 -arg2 3", 2)[code]......

View 1 Replies

Alter The .visible Property Of A Label Based On If A Variable Is Positive Or Negative?

Apr 11, 2010

I want to alter the .visible property of a label based on if a variable is positive or negative (Hiding it for negative values)
But I want to do this for lots of labels so If Statements are too bulky.

I tried this:

Label1.visible = CBool(IntVariable1)

But it turns out CBool returns True for ANY value and False for Zero.I'd assumed it would be True for positive values and False for negatives.How can I do it without if statements?I considered Modulo or SquareRoots to somehow convert a negative number into zero, but didn't want to complicate things with imaginary numbers.

View 2 Replies

Make A Simple Browser With Some Simple Addon's?

Dec 9, 2011

Trying to make a simple browser with some simple addon's. What Ive done is setup a menu(forum) for the user to enter their email providers web address and it will save it in a xml file. When they click on the email link, it should load the email xml iformation and place that info in the tb_html.text and navigate. I keep getting a null exception and im not sure what going on here. Here is the code:

Browsers:
Private Sub btn_Email_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Email.Click
'Load Action
Dim SavedEmailObj As Storage

[code].....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved