Question about Computers & Internet

1 Answer

Formatting/Rounding number Sir, If you could tell me the following questions by giving examle code, I shall be very glad to you: 1.I want to know how could I write a VB Code (using VB6) so that the product of two variable should be rounded to the nearest number which is always divisible by 5 or 10 (Say). 2. Formatting of Text: What will be the source code (Using VB) so that any First letter of word written in the textbox will be Capital. K.Vanlalliana, Aizawl,Mizoram.

Posted by on

1 Answer

Forget its not your cup of tea

Posted on Aug 30, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

Serial Number 3792969


I doubt you're asking about compilers and programming tools, even though you posted your question in that category. Would you care to tell us what you are asking about? A serial number doesn't tell us anything without knowing what it's attached to.

Oct 16, 2013 | Computers & Internet

1 Answer

What is the source code having an output of 1 21 321 using for loop statement in microsoft visual c++?


I believe you're asking for a loop that will output that sequence specifically. One way to go about it is with the following code:

for (int i = 0; i < 3; i++)
{
if (i == 0)
cout << i+1 << endl;
else if (i == 1)
cout << i + 1 << i << endl;
else
cout << i +1 << i << i - 1 << endl;
}

I know the hard coded numbers is a bit inelegant, but in this case this snippet of code will solve the problem.

Aug 24, 2011 | Microsoft Visual C++ 6.0 Professional...

1 Answer

Sir, give me sample java problem! for i can solve.


Look at the method below which finds prime numbers. public class Primes { private static void findPrimes(int nValues, boolean printPrimes) { boolean isPrime = true; for (int i = 2; i <= nValues; i++) { isPrime = true; for (int j = 2; j < i; j++) { if (i % j == 0) { isPrime = false; break; } } if (printPrimes && isPrime) { System.out.println(i); } } } // REMAINING METHODS NOT SHOWN }Implement the method findPrimesFaster in class Primes by copying the code from the findPrimes method and modifying it to have the following features:
  • Uses labeled continue instead of break.
  • Does not require the isPrime variable.
  • Only tries to divide by integers up to the square root of the number being tested.

Sep 25, 2009 | Sun Java Programming Language (cdj-275)

1 Answer

How to reformat a notebook laptop with no CD-ROm? or an external Cd-rom? what shall i use? and what to do? tnx!


u need either pendrive or external usb harddisk to do that. first use nero to copy the image of the xp disk in any of the media. and then boot that media to do the formatting

Sep 05, 2009 | Computers & Internet

2 Answers

VB 6.0 ROUNDING A NUMBER


Use the Math.Round() function. It takes two arguments, the first is your number or a variable holding your number and the second is the number of decimal places. This will only round to fractions of a whole number though and you need to round to the nearest 10. So divide your number by 10 before you round to shift the decimal place once to the left and multiply by 10 again afterwards to shift it back again.

answer = Math.Round(32.1 / 10, 0) * 10

Apr 02, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

Rounding Off numbers to the nearest tens


is it helpful or not plz reply me and ask me syntax i m intersted in solving problem like this bcoz through it i get refreshed in C languge.
u can send me a query on my email akhilgnit @gmail.com
thnx

Feb 07, 2009 | Microsoft Visual Basic 6.0 for PC

1 Answer

Need help in Special Formatting Number


Here is one solution. You might consider adding more robust error handling.
if the decimal numbers passed to the div function are multiples i will be a non-zero number of that multiple otherwise i will be zero.

Dim i As Integer
i = div(12, 0)
If i = 0 Then
'not multiple
' do this
Else
' is multiple
' do something else
End If


Function div(ByVal numerator As Object, ByVal denominator As Object) As Integer
dim n , d decimal
Dim result As Decimal
Dim remainder As Decimal

If IsNumber(numerator) Is True _
And IsNumber(denominator) Is True Then
If numerator <> 0 Then
n = numerator
d = denominator
Else
GoTo error1
End If
Else
GoTo error1
End If
result = Decimal.divide(n, d)
remainder = Decimal.remainder(n, d)
If remainder = 0 Then
div = result
Else
div = 0
End If

Exit Function
error1:
msgbox("Numbers must be non-zero numerics", , "Multiple check error")
div = 0
End Function

End Function

Aug 06, 2008 | Computers & Internet

1 Answer

Program


Sub aa()
'
' aa Macro
'
'
Dim a As String
a = "how are you this is dharani"
Dim leng, cnt As Integer
leng = 1
cnt = 0
While leng <= Len(RTrim(a))
If Mid(a, leng, 1) = " " Then
cnt = cnt + 1
End If
leng = leng + 1
Wend
If Len(RTrim(a)) > 0 Then
cnt = cnt + 1
End If
MsgBox Str(cnt) + " Words"
End Sub

Feb 27, 2008 | Computers & Internet

2 Answers

Help me


this the code for your problem. by the way this for vb6.0

Sub CountCharacters(Text As String)
Dim iVowel As Integer
Dim iCons As Integer
Dim iNum As Integer
Dim iSpace As Integer
Dim iOther As Integer

Dim cnt As Integer
Dim sChar As String

For cnt = 1 To Len(Text)
sChar = LCase(Mid(Text, cnt, 1))

Select Case sChar
Case "a", "e", "i", "o", "u" ' And sometimes "y"?
' Vowel
iVowel = iVowel + 1
Case "a" To "z"
' Includes the first case, but VB matches the first case and stops
iCons = iCons + 1
Case "0" To "9"
' Numbers
iNum = iNum + 1
Case " ", vbTab, vbLf
' Space characters
' Not including vbCr as this will likely be dealing with Windows text
' and I only want to match one character for a newline
iSpace = iSpace + 1
Case Else
If sChar <> vbCr Then iOther = iOther + 1
End Select
Next cnt

Debug.Print "Text: " & Text
Debug.Print "Vowels: " & CStr(iVowel)
Debug.Print "Consonants: " & CStr(iCons)
Debug.Print "Numbers: " & CStr(iNum)
Debug.Print "Space characters: " & CStr(iSpace)
Debug.Print "Other: " & CStr(iOther)
End Sub

Feb 21, 2008 | Computers & Internet

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

69 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

98796 Answers

David Payne
David Payne

Level 3 Expert

14071 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...