{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Lab_04-solution - L ab T utorial#04 VAR IABLES DATA TYPES...

This preview shows pages 1–3. Sign up to view the full content.

Lab / Tutorial #04 VARIABLES, DATA TYPES, TYPE CONVERSION, CONSOLE INPUT-OUTPUT Question 1 Create a C# program (name it to DisplayConsole) to do the followings Display “*** 7.103 Fundamentals & Principles of Computer Programming ***” Display “Our program is to add two numbers: 12 and 25” Display “The answer should be 37” namespace DisplayConsole { class Program { static void Main( string [] args) { Console .WriteLine( "*** 7.103 Fundamentals & Principles of Computer Programming ***" ); Console .WriteLine( "Our program is to add two numbers: 12 and 25" ); Console .WriteLine( "The answer should 37" ); Console .ReadKey(); } } } Question 2 Create a C# program (name it to SUMConsole) to do the followings x = 12 y = 25 Add x to y Display “*** 7.103 Fundamentals & Principles of Computer Programming ***” Display “Our program is to add two numbers: 12 and 25” Display “The answer should be 37” Display the sum of x and y

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
namespace SUMConsole { class Program { static void Main( string [] args) { int x = 12, y = 25, z = 0; z = y + x; Console .WriteLine( "*** 7.103 Fundamentals & Principles of Computer Programming ***" ); Console .WriteLine(
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

Lab_04-solution - L ab T utorial#04 VAR IABLES DATA TYPES...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online