Lab_04-solution - Lab / Tutorial #04 VARIABLES, DATA TYPES,...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab / Tutorial #04 VARIABLES, DATA TYPES, TYPE CONVERSION, CONSOLE I N PUT-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 namespace SUMConsole { class Program { static void Main( string args) {...
View Full Document

This note was uploaded on 04/03/2011 for the course ECON 7.104 taught by Professor Wei during the Spring '11 term at Faculty of English Commerce Ain Shams University.

Page1 / 5

Lab_04-solution - Lab / Tutorial #04 VARIABLES, DATA TYPES,...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online