Question: using System; using static System.Console; class InteractiveAddition { static void Main ( ) { string name, firstString, secondString; int first, second, sum; Write (

using System;
using static System.Console;
class InteractiveAddition
{
static void Main()
{
string name, firstString, secondString;
int first, second, sum;
Write("Enter your name... Kreshawn");
name = ReadLine();
Write("Hello {0}! Enter the first integer... 12", name);
firstString = ReadLine();
first = Convert.ToInt32(firstString);
Write("Enter the second integer... 399");
secondString = ReadLine();
second = Convert.ToInt32(secondString);
sum = first + second;
WriteLine("{0}, the sum of {1} and {2} is {3}", name, first, second, sum);
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!