Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Can anyone tell me what is wrong with this program?
New Posts  All Forums:Forum Nav:

Can anyone tell me what is wrong with this program?

post #1 of 4
Thread Starter 
Hey guys , i am helping a friend ....

heres what they need to do...

Ok the story is that I gotta write a program that wil calculate a 9percent interest on the original amount that a client puts in, and it must display the final amount (which is the initial amount they put in plus the 9 percent interest)


heres a Screenie :


My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 4790K 4.8GHZ 1.35V MSI Z97 M-Power EVGA GTX 980 Superclocked 16GB Corsair Vengeance 
Hard DriveOSMonitorPower
4x1TB 7,200RPM , 1x128GB Samsung SSD 1x 128GB K... Windows 7 64Bit Ultimate Samsung SA950D+ Optoma HD82 Antec 1000W Platinum 
CaseMouse
NZXT Phantom Logitech G7 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 4790K 4.8GHZ 1.35V MSI Z97 M-Power EVGA GTX 980 Superclocked 16GB Corsair Vengeance 
Hard DriveOSMonitorPower
4x1TB 7,200RPM , 1x128GB Samsung SSD 1x 128GB K... Windows 7 64Bit Ultimate Samsung SA950D+ Optoma HD82 Antec 1000W Platinum 
CaseMouse
NZXT Phantom Logitech G7 
  hide details  
Reply
post #2 of 4
In the last line of Sub txtFinal_TextChanged, I think you need to convert the CInt(Calculate) to a string since you are setting it to a Text field.

CStr(CInt(Calculate)) might fix your problem, but I only know a little VB.
Nevermore
(17 items)
 
  
Reply
Nevermore
(17 items)
 
  
Reply
post #3 of 4
Quote:
Originally Posted by KC_Flip View Post
In the last line of Sub txtFinal_TextChanged, I think you need to convert the CInt(Calculate) to a string since you are setting it to a Text field.

CStr(CInt(Calculate)) might fix your problem, but I only know a little VB.
Or use .net syntax.

TxtFinal.Text=Calculate.ToString()

Also, since you calculate interest, seems double, single or decimal datatype is more appropriate.
Edited by linskingdom - 2/19/09 at 7:19pm
post #4 of 4
just do a:

original=txtoriginal.text
intrest=original * .09
final=original+intrest

that would get it done, and is far simpler to me at least
    
CPUMotherboardGraphicsRAM
AMD FX-8120 ASUS 990FX Sabertooth 3x MSI RX 480 4GB 4x4GB Samsung wonder RAM 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 830 256GB Western Digital 1TB Black Samsung 850 1TB LG Sata DVD 
OSMonitorKeyboardPower
Windows 10 64-bit, Ubuntu 16.04 64-bit LG 22" WS Microsoft Sidewinder X4 Corsair 850w Modular 
CaseMouseMouse Pad
Antec Twelve-Hundred Microsoft Sidewinder X3 Gateway 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD FX-8120 ASUS 990FX Sabertooth 3x MSI RX 480 4GB 4x4GB Samsung wonder RAM 
Hard DriveHard DriveHard DriveOptical Drive
Samsung 830 256GB Western Digital 1TB Black Samsung 850 1TB LG Sata DVD 
OSMonitorKeyboardPower
Windows 10 64-bit, Ubuntu 16.04 64-bit LG 22" WS Microsoft Sidewinder X4 Corsair 850w Modular 
CaseMouseMouse Pad
Antec Twelve-Hundred Microsoft Sidewinder X3 Gateway 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Can anyone tell me what is wrong with this program?