<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://freemwiki.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Add_Two_Numbers_in_Visual_Basic</id>
	<title>How to Add Two Numbers in Visual Basic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://freemwiki.com/index.php?action=history&amp;feed=atom&amp;title=How_to_Add_Two_Numbers_in_Visual_Basic"/>
	<link rel="alternate" type="text/html" href="https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;action=history"/>
	<updated>2026-05-21T14:58:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;diff=17940&amp;oldid=prev</id>
		<title>Lukegao at 22:19, 8 March 2025</title>
		<link rel="alternate" type="text/html" href="https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;diff=17940&amp;oldid=prev"/>
		<updated>2025-03-08T22:19:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;amp;diff=17940&amp;amp;oldid=8358&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Lukegao</name></author>
	</entry>
	<entry>
		<id>https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;diff=8358&amp;oldid=prev</id>
		<title>Lukegao1: 创建页面，内容为“To add two numbers in Visual Basic, you can follow these steps:  1. Open a new or existing Visual Basic project in your Visual Studio environment.  2. Create two variables to hold the values of the numbers you want to add. For example, you can declare two variables named &quot;num1&quot; and &quot;num2&quot; like this:     ```    Dim num1 As Integer    Dim num2 As Integer    ```  3. Prompt the user to input the values of the two numbers. You can use the InputBox function for this,…”</title>
		<link rel="alternate" type="text/html" href="https://freemwiki.com/index.php?title=How_to_Add_Two_Numbers_in_Visual_Basic&amp;diff=8358&amp;oldid=prev"/>
		<updated>2023-03-21T15:59:45Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“To add two numbers in Visual Basic, you can follow these steps:  1. Open a new or existing Visual Basic project in your Visual Studio environment.  2. Create two variables to hold the values of the numbers you want to add. For example, you can declare two variables named &amp;quot;num1&amp;quot; and &amp;quot;num2&amp;quot; like this:     ```    Dim num1 As Integer    Dim num2 As Integer    ```  3. Prompt the user to input the values of the two numbers. You can use the InputBox function for this,…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To add two numbers in Visual Basic, you can follow these steps:&lt;br /&gt;
&lt;br /&gt;
1. Open a new or existing Visual Basic project in your Visual Studio environment.&lt;br /&gt;
&lt;br /&gt;
2. Create two variables to hold the values of the numbers you want to add. For example, you can declare two variables named &amp;quot;num1&amp;quot; and &amp;quot;num2&amp;quot; like this:&lt;br /&gt;
&lt;br /&gt;
   ```&lt;br /&gt;
   Dim num1 As Integer&lt;br /&gt;
   Dim num2 As Integer&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
3. Prompt the user to input the values of the two numbers. You can use the InputBox function for this, like so:&lt;br /&gt;
&lt;br /&gt;
   ```&lt;br /&gt;
   num1 = InputBox(&amp;quot;Enter the first number:&amp;quot;)&lt;br /&gt;
   num2 = InputBox(&amp;quot;Enter the second number:&amp;quot;)&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
4. Add the two numbers together using the &amp;quot;+&amp;quot; operator, and store the result in a variable. For example:&lt;br /&gt;
&lt;br /&gt;
   ```&lt;br /&gt;
   Dim sum As Integer&lt;br /&gt;
   sum = num1 + num2&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
5. Display the result to the user. You can use the MessageBox function to do this, like so:&lt;br /&gt;
&lt;br /&gt;
   ```&lt;br /&gt;
   MessageBox.Show(&amp;quot;The sum of &amp;quot; &amp;amp; num1 &amp;amp; &amp;quot; and &amp;quot; &amp;amp; num2 &amp;amp; &amp;quot; is &amp;quot; &amp;amp; sum)&lt;br /&gt;
   ```&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s the complete code:&lt;br /&gt;
&lt;br /&gt;
```&lt;br /&gt;
Dim num1 As Integer&lt;br /&gt;
Dim num2 As Integer&lt;br /&gt;
Dim sum As Integer&lt;br /&gt;
&lt;br /&gt;
num1 = InputBox(&amp;quot;Enter the first number:&amp;quot;)&lt;br /&gt;
num2 = InputBox(&amp;quot;Enter the second number:&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
sum = num1 + num2&lt;br /&gt;
&lt;br /&gt;
MessageBox.Show(&amp;quot;The sum of &amp;quot; &amp;amp; num1 &amp;amp; &amp;quot; and &amp;quot; &amp;amp; num2 &amp;amp; &amp;quot; is &amp;quot; &amp;amp; sum)&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Lukegao1</name></author>
	</entry>
</feed>