Assignment A


Problem A1

Use the lab instructions given on the Internet at http://voyager.deanza.edu/~oldham

Replace the name John Smith (Jack) with your name.

Compile it, correct any errors and execute it.

Use the following test data:

3 and 5

Copy the execution results following the line Execution Results:

Type the answer to the following question after the line

Answer to the question:

What executable code is different between this program and

program 1-3 on page 8?

Print the completed program with the execution results and answer to the question.


/* John Smith (Jack)

CIS 15AG Winter 2005

Laboratory Assignment A

Handout problem A1


This program reads two integer numbers from the

keyboard and prints their product.

*/

#include <stdio.h>


int main ( void )

{

// Local Declarations

int number1 ;

int number2 ;

int result ;


// Statements

printf ( "Please enter the first number: ");

scanf ( "%d", &number1 ) ;

printf ( "Please enter the second number: ");

scanf ( "%d", &number2 ) ;

result = number1 * number2 ;

printf( "The product of the numbers is %d\n", result ) ;

return 0 ;

} // main

/* Execution results:


*/

/* Answer to the question:


*/