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
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)
what's the problem that you're having?
I'm trying to create a code that can calculate simple interest with visual code 6.0
okay, show us the code and the errors you're getting
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
My main problem is here
And what is that main problem?
I think I figured it out myself lol
My calculations was wrong
you should avoid floating numbers
calculate everything in integer, then divide by 100
Yeah that was my mistake
its a common mistake
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.
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?
The instruction is to use the visual basic to solve the problem
but you specified vb6, which is wildly different from vb.net
however, both are visual basic
even vbscript is visual basic
Yeah