Distance Calculator Using Visual Studio 2010 C# what is the code? If you know a
ID: 3669329 • Letter: D
Question
Distance Calculator
Using Visual Studio 2010 C#
what is the code?
Explanation / Answer
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 distance_calculator
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a = Convert.ToInt32(textBox1.Text);
int b = Convert.ToInt32(textBox2.Text);
for (int i = 1; i <= b; i++)
listBox1.Items.Add("After hout " + i + " the distance is " + (a * i));
}
}
}