Lab_05 - Lab / Tutorial #05 OPERATORS, EXPRESSIONS, COM...

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 #05 OPERATORS, EXPRESSIONS, COM MENTS & WINDOW FOR M Question 1 Modify the DisplayConsole program to add the comment below Author: Havea H. Fonua Date: 25 Sep 2010 Description: This program has been developed to display some texts or string of characters into the Console User-Interface 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 Modify the SUMConsole program to add the comment below and also comment on the line z = y + x. How many variables used in the program? What data types used to declare those variables? List the operators used in the program and their meaning. How many program statements (or instructions) and their meaning? How many expressions in the program? Author: Havea H. Fonua Date: 30 Sep 2010 Description: This program has been developed to add two numbers and display to the Console User-Interface 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( "Our program is to add two numbers: {0} and {1}" ,x,y); Console .WriteLine( "The answer should {0}" ,z); Console .ReadKey(); } } } Question 3 Modify the AISConsole program to add the comment below. How many variables Modify the AISConsole program to add the comment below....
View Full Document

Page1 / 5

Lab_05 - Lab / Tutorial #05 OPERATORS, EXPRESSIONS, COM...

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