Hi, i am supposed to make a program that shoots out a appropriate answer to when a value has been added. I am having troubles with this, everytime i try to run the program, it does run, but what happens is that, the same word "freezing" comes up. I cant seem to figure this out. My code is fairly simple! Please if someone could help me out, it would sooo great!! Thank you.
[using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace assign4Part1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int tempInteger=0;
if (tempInteger <= 32)
{
label2.Text = "Freezing";
}
else if (tempInteger > 80)
{
label2.Text = "Hot";
label2.Focus();
label2.Select();
}
}
}
}
]
If/else if problems
Page 1 of 11 Replies - 123 Views - Last Post: 18 November 2012 - 09:56 PM
Replies To: If/else if problems
#2
Re: If/else if problems
Posted 18 November 2012 - 09:56 PM
Please avoid duplicate posting. Also, please use code tags:
.
Page 1 of 1
|
|

New Topic/Question
This topic is locked



MultiQuote







|