473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

dividing numbers

hey all,

i'm trying to convert cint(1.8) into an int
and whenever i do it makes it a 2.

how do i make it a 1?

thanks,
rodchar

Nov 19 '05 #1
2 1083

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
hey all,

i'm trying to convert cint(1.8) into an int
and whenever i do it makes it a 2.

how do i make it a 1?

thanks,
rodchar


Dim d As Double = 1.8
Dim i As Integer = Math.Floor(d)

:) HTH,
Mythran

Nov 19 '05 #2
thank you very much.

"Mythran" wrote:

"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:09**********************************@microsof t.com...
hey all,

i'm trying to convert cint(1.8) into an int
and whenever i do it makes it a 2.

how do i make it a 1?

thanks,
rodchar


Dim d As Double = 1.8
Dim i As Integer = Math.Floor(d)

:) HTH,
Mythran

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jack Higgs | last post by:
I'm building a maths program for year 6 children. Problem with division - I generate a random number between say 1 and 1000. I want to generate another random number which when divided by the...
5
by: M. Akkerman | last post by:
Hi, I've been working on this problem for a while now but I just can't seem to find a good solution for it. Here is the situation. I have the following class class TBigNumber {
65
by: Pmb | last post by:
I'm confused as to what the compiler error message I'm getting is refering to. Can someone take a gander and let me know what I did wrong? The program is below. When I compile it I get the...
5
by: Hasanain F. Esmail | last post by:
I have spent many hours to solve this problem but no result yet. Your help will highly be appriciated. Problem: Let us say I have two field named as number1 and number2 There are 12 pcs of an...
3
by: gh | last post by:
I am dividing var1 by var2 and I want to check and see if there is a remainder. How do I do this in C#? TIA
4
by: Harish Ramadurgam | last post by:
hai, Can anyone help me how to divide my program into different projects? I am using VC++ compiler. Regards, Harish.
11
by: redefined.horizons | last post by:
I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want...
2
by: meggahertz | last post by:
Hello Everyone! I need help with dividing a list of numbers in to groups of numbers that have constant difference between them. This constant number does not change it remains the same . e.g. 1000...
2
kcdoell
by: kcdoell | last post by:
Hello: I have three unbound text boxes in which I have the following calculations in the control source of each box: FCST Total; =Nz(DSum("","ReQryForecast"," >= 75"),0) Budget Total; ...
1
by: Odeh Naber | last post by:
Greetings all! I have a report in which I have seven columns: Column 1: Day number (i.e. Day 1, Day 2, Day 3, etc.). Column 2: SalesCost for that day. Column 3: SalesCost to-date (running sum...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.