Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

0262660709, 978-0262660709

More Books

Students also viewed these Databases questions