Show Only 1 Number In The Result Of A Division?
Mar 11, 2010i have a division of 2 integer that give me a result as2,3944534 ...how i can give e result as
View 3 Repliesi have a division of 2 integer that give me a result as2,3944534 ...how i can give e result as
View 3 RepliesWhen logging into my system, I select the number of result that needs to appear on the report. In my stored procedure it selects count of all the data for a period. It returns all in the information, but I only want the number of records to appear on the report that I selected at the beginning.
View 1 RepliesI've got a problem approximating the result of a division that should give a sharp result:
I use this code:
pListPrice *= 100 / (100 + VATPercentage)
where VATPercentage = 20D is declared as Decimal type. pListPrice = 25.2D is declared Decimal too.
The result should be: 21.00 sharp!
Instead I get 20.99999999999999999999D
How do I change / convert the result of the division or multiplication examples of the division = 200,1247 becomes 200,12 (2 decimal) I use this coding corrected my code is
[Code]...
i face a problem while i practice the question in my text book, it require us to key in 4 digit of number and split it into 4 digit and encrypt it. Below is my coding [code] Console.WriteLine("The encrypted number is: " & encrypNumber3 & encrypNumber2 & encrypNumber1 & encrypNumber4)But its got error after i key in the 4 number.
View 2 RepliesHow do you check if the division of two integers is a whole number, just answer with code, no links?
View 6 RepliesUsing
Dim RXLIKEIT As New System.Text.RegularExpressions.Regex("(?<="">).+?(?=</a></td>s<td>)")
MsgBox("Did you mean't:" & (RXLIKEIT.Match(DL).Value))
How do i put it show more results than only one "RXLIKEIT"?
I'm writing a program for my algebra students to practice integers.Stuff like....
3-6
-4 + (-5)
3(-4)
-15 � 3
etc.
I want to show an explanation and for the addition and subtraction, I want to show it on a number line. For example, if the problem is 3 - 7, the number line should show and arrow to that goes right to 3, and then left 7 units (starting from 3). Then the student can see that the answer is -4.I could probably do this with some string manipulation, but what would be the easiest way to do it in a picture format? Maybe a bitmap.
I am using the Math.Exp function in a calculation, and the result essentially is Infinity / 1 + Infinity, which is 1 statistically, but it is showing as "NaN" (not a number). Is there a way to calculate/show the result of this as 1 (besides just testing for NaN and explicitly setting it as 1?) [code] X is a number larger than 709.782712893 in order to get the NaN result.
View 18 RepliesIn VB if you prompt the user for a number between 1-20, then a word, how do you get a text box to show the word the same number of time as the number selected using loops?... Ex: please select a number: 4 / select a word: cat....the text box should display ::: catcatcatcat ........
I am doing this for a class and my brain has locked up. Prob. just over thinking it though. Thanks in advance for any help!
I'm trying to get the row number of the result row but I don't know the exact syntax.
For x = 0 To BDataGrid.RowCount - 1 'sort thru datagridview
If BDataGrid.Rows(x).Cells(0).Value = newID Then 'if result found
'get row number of result row???
End If
Next
I'm working on some coding katas and managed to finish the algorithms and am now coding it?However, I can't seem to get Command Prompt to display the result.
Here's the code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
[code]....
i've been working on a project that works with a MySQL DB, and every time the SQL executes and adds the listbox items it wont show the first result i have no idea what i am doing wrong here.
vb.net
Dim NwConn As MySqlConnection NwConn = New MySqlConnection NwConn.ConnectionString = "server=XX.XXX.XX.XX; user id=XXXXX; password=******; database=*****;" Try NwConn.Open()
[Code]...
hope someone can give me a solution or if someone can tell me what i have been doing wrong.
i need to add the number in textbox 1 to textbox2 and mutiply the result times .10, if the result is grater than or equal to 2000 i need to add 12 other wise i need to add 10 heres my code
Dim total double
total = Val(txtbox1.Text) + Val(txtbox2.Text) * 0.10
If total >= 2000 Then
[Code]....
I have a situation to show response coming back from host in some control of a Form and want to print it.The response is coming from Host mainframe system in text based format. I want to show the response in a graphical format. I am looking for suitable control that help me to print and should look like word document. I looked PrintPreview and PrintDocument controls but my requirement is there should be some control on Form where my formatted output should be placed (like Rich Textbox). Which control I should use.
View 6 RepliesPublic Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]....
The end result is baffling me here are 2 examples when I debug
Mine: 640.1 * 49 = 31364.9
Debugger: 640.1 * 49 = 31360 ( not right needs to show the correct decimal )
Mine: .775 * 3 = 2.325
Debugger: .775 * 3 = 2.325 ( shows it perfectly???)
is there any way I can run dxdiag in the background and then show the result in a richtextbox?I know there are tools that can run dxdiag and show you the information.How can I do this so the information appears in a richtextbox?
View 6 RepliesHow do i code so my program will give me a message box if there are no result of my database search?
there is the code for the search. [Code]
I have a question regarding LINQ 2 SQL and data integration with textbox:I have one textbox and button on my form, one stored procedure and LINQ 2 SQL class file in my project,I want that when I hit button, my store procedure run the SQL query and show me the result in textbox.I am using VB 2008 and Visual Basic for programing.
View 2 Repliescorrect syntax to format decimals. I want 2 decimal places even if the result is an even number i.e. I want 40 to show as 40.00 and 40.6666667 to show as 40.67.
View 8 RepliesI need to pupulate a Grid, but i like to do like Microsoft SQL Server Management Studio, when you make a Select to a table with bounch of rows, it start show the result but in the botton still retriving data.So you can start looking the data, not like you get the data and after you get the last row you can asing to the Grid.
View 6 RepliesToday I installed VB 2008 express and having some older experience with VB at school I tried to translate some algorithm functions to VB. I came across these lines which are very simple.I had one textbox and wanted to show The result is x when i click the button. so, here is the part of the program.
Dim x As Integer
Dim y As Integer
Dim w As Integer
[code]....
Because I write on paper in pseudo, "The result is", x would be correct and would show The result is x but instead, VB finds error. Does , indicate space here or does it recognise it as something else?
I have the following code:
FormatNumber(.Item("Class_RAmt").ToString(), 2)
It able to convert the string to number, but the result is 1,200.00. How can I remove the comma within the number for example, 1200.00 instead of 1,200.00.
i need some help here, i want a result that shown a total number from student who passed some subjects. Let say there are 8 student who got A in subject chemistry, then the output should display result something like " there are 8 students who got A in chemistry". And also is it possible to combined the result, for example i want the output something like "there are "X" students who got A in chemistry and physics". where "X" is variable (number). it should trigger when winform is loaded. im using bindingsource.filter, but failed. because using bindingsource.filter need the input from user then it produce the output. whereas i want the result shown when the winform is loaded. How can i achieve this.
View 4 RepliesI'm trying to do this division and the result to be displayed on a eight decimal number.
Dim r1 As Integer
Dim r2 As Double
r1 = Val(TextBox16.Text)
r2 = r1 / 60
TextBox18.Text = FormatNumber(r2, 8)
The value or R1 on this case is 273.4 but it varies according with the result obtained so I can not allocate a constant number to r1. The problem is the result that I am getting is 4,55000000 instead of 4.5566666
I have set up text boxes for user to pick a number 1-20 and to enter a word as well. Then, press submit button. What's supposed to display in result textbox is the word that many number of times. For example if the number is 5 and the word is hello, then "hellohellohellohellohello" should appear. I don't know how to complete my For...Next function to append the word to the result.
Public Class Ch6ex1
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click
[CODE].....................
I am working in excel trying to setup a function involving multiplying a cell by a set number and then having the result round to the nearest 10. Here's the beginning of my function statement fx=e3*1.026. say the result is 8654, I need it to round to 8650. Also if it comes back 8655, I need it to round to 8660. I have about 2,000 records I need to do this to so I was hoping that one formula or statement could be used for all my data.
View 2 RepliesI am using vb.net in a project and in one of my forms i added a datagridview(i am using Access database bytheway). In this datagridview i have 3 columns from the same data table(name, surname,telephone). My question is : "How can i give the telephone number in telephone(textbox) cell and view as result the name and surname in each of the cells? "
View 6 RepliesAll I try to do is to display 10 as 10.00
Dim amount As Double = 10
lblAmount.Text = Format(amount, "##,##0.00")
And what I am getting is this
&10=##,##0.00
i want a automatic packet number in text box if there is no data in database...if there is a data i want to add 1 in packet number to next packet in text box'packet no= JA0001
q = "select max(mid(pack_no,3,4))as max_pck_no from mef_info where mid(pack_no,1,2)='"JA "'"
cn = New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=Database Path ;Jet OLEDB:Database Password=*********;")
[Code]...