Answer to Question #74903 in Visual Basic for musaad Alanazi

Question #74903
Fix the following code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace @if
{
public partial class Form1 : Form
{
int secretNumber = 9;
int anyNumber;

public Form1()
{
InitializeComponent();
}

private void btnGuess_Click(object sender, EventArgs e)
{
anyNumber = Convert.ToInt32(textBoxInput.Text);
if (anyNumber < secretNumber)
lblOutput.Text = "Number is low";
if (anyNumber > secretNumber)
lblOutput.Text = "Number is high";
else
lblOutput.Text = "Number is correct";
}

private void btnExit_Click(object sender, EventArgs e)
{
Application.Exit();
}
}
}
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS