Assignment A

Problem A1

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

Type a copy of the following program.
Replace the name John Smith (Jack) with your first name, last name, and, if you use one, your nickname in parentheses.
Compile it, correct any errors and execute it.
Use the following test data:
4 and 9

Copy and paste the execution results under the line   /* Execution Results:
Type the answer to the following question under the line   /* Answer to the question:
What executable code is different between this program and program 1-3 on page 10?

Print the completed program with the execution results and answer to the question from within the Interactive Development Environment.

/* 
  John Smith (Jack)
  CIS 15AG Winter 2005
  Assignment A
  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:


*/