TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
aaa
NA
9
0
multiply a decimal, simple help for a noob
Feb 1 2008 1:09 PM
So I'm able to do some simple multiplication but once I add a decimal I'm lost...
Goal.. type in an hourly wage and calculate a yearly salary (multiply by 2080)
Then Calculate take home after taxes (multiply 'yearly salary' by .8)
Here is a link to the full project incase the copy paste code doesn't contain all the information...
C# form application..
Thanks!!
Begin Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Salary_Calculator_13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnCalculate_Click(object sender, EventArgs e)
{
int salary = 2080 * int.Parse(txthourly.Text);
lblamountyr.Text = salary.ToString();
}
private void btnaftertaxes_Click(object sender, EventArgs e)
{
int aftertax;
//aftertax = .8 * int.Parse (lblamountyr.Text);
//But I don't know how to handle decimals yet and the above no worky
lblamounttx.Text = aftertax.ToString();
}
}
}
Reply
Answers (
7
)
How to change a tabcontrol when a user clicks on a label on that control
webcontrol.imagebutton