VISUAL BASIC 6.0

Good morning coders, can anyone help me with how to use visual basic 6.0 to solve some simple problems using visual basic 6.0. I would appreciate if you do that with images. Gracias.
17 Replies
Jochem
Jochem2y ago
like the message just before your question in #general, don't ask to ask Just ask your actual question. I've been using PHP for decades, but if you asked me "can someone help with PHP to solve some problems" I wouldn't say a word. Show me the problem, and I'll automatically try to solve it. (Just trying to get you decent help here btw, I don't know anything about VB)
ἔρως
ἔρως2y ago
what's the problem that you're having?
Humble Lion ™
Humble Lion ™OP2y ago
I'm trying to create a code that can calculate simple interest with visual code 6.0
ἔρως
ἔρως2y ago
okay, show us the code and the errors you're getting
Humble Lion ™
Humble Lion ™OP2y ago
Ok so I'm trying to a code that (when salary value is inputted) calculates users take-home pay after all deductions and allowances. Below are the allowances: Transport = 10% of basic salary Rent = 15% of basic salary Hazard = 6.5% of basic salary Below are the deductions: Pension = 7.5 % of basic salary NHIS = 5% of basic salary Tax = 2% of basic salary So I used the following calculate the percentage of both the allowances and deductions (Amount *%)/100
Humble Lion ™
Humble Lion ™OP2y ago
My main problem is here
No description
Humble Lion ™
Humble Lion ™OP2y ago
No description
Jochem
Jochem2y ago
And what is that main problem?
Humble Lion ™
Humble Lion ™OP2y ago
I think I figured it out myself lol My calculations was wrong
ἔρως
ἔρως2y ago
you should avoid floating numbers calculate everything in integer, then divide by 100
Humble Lion ™
Humble Lion ™OP2y ago
Yeah that was my mistake
ἔρως
ἔρως2y ago
its a common mistake
reddogg476
reddogg4762y ago
You should try with a dotnet console and C#. VB.net is not in continued development, it is only in a 'stay alive' mode. C# is more friendly for calculations using decimal types for precision financial calculations as well as ints and doubles. https://learn.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/tutorials/numbers-in-csharp-local
Numbers in C# - Introduction to C# tutorial - C#
Learn C# by exploring numeric types, their uses, properties, and methods.
ἔρως
ἔρως2y ago
vb6 projects cant be easily ported to .net, and .net requires the .net/mono environment to run (vb6 runs natively). also, if it works, why change?
Humble Lion ™
Humble Lion ™OP2y ago
The instruction is to use the visual basic to solve the problem
ἔρως
ἔρως2y ago
but you specified vb6, which is wildly different from vb.net however, both are visual basic even vbscript is visual basic
Humble Lion ™
Humble Lion ™OP2y ago
Yeah

Did you find this page helpful?