|
-
Jun 19th, 2007, 12:22 AM
#1
Thread Starter
Fanatic Member
[2.0] how decimal work?
using this code; why doesn the ave is still a whole number?
int nmb1;
int nmb2;
int nmb3;
decimal ave;
nmb1 = int.Parse(textBox1.Text);
nmb2 = int.Parse(textBox2.Text);
nmb3 = int.Parse(textBox3.Text);
ave = (nmb1 + nmb2 + nmb3) / 3;
textBox4.Text = ave.ToString();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|