include - #include

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

View Full Document Right Arrow Icon
#include <stdio.h>   void printArray(int array[][4]); /* declare function */   int main() {   int array[3][4] = {0,1,2,3,4,5,6,7,8,9,10,11};   printArray(array);   getchar();   getchar();   getchar();   return 0; }   void printArray(int array[][4]) { /* define function */   int i, j;     for(i=0 ; i<3 ; i++) {     for(j=0 ; j<4 ; j++) {       printf("%2d ", array[i][j]);     }     printf("\n");   } } #include <stdio.h>   void printArray(int array[][4]); /* declare function */   int main() {   int array[3][4] = {0,1,2,3,4,5,6,7,8,9,10,11};   printArray(array);   getchar();   getchar();   getchar();   return 0; }   void printArray(int array[][4]) { /* define function */ 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
  int i, j;     for(i=0 ; i<3 ; i++) {     for(j=0 ; j<4 ; j++) {       printf("%2d ", array[i][j]);     }     printf("\n");   }} #include <stdio.h> int addNumbers(int fiveNumbers[]); /* declare function */   int main() {   int array[5];   int i;     printf("Enter 5 integers separated by spaces: ");     for(i=0 ; i<5 ; i++) {     scanf("%d", &array[i]);   }     printf("\nTheir sum is: %d\n", addNumbers(array));   getchar();   getchar();   getchar();   getchar();   return 0; }   int addNumbers(int fiveNumbers[]) { /* define function */   int sum = 0;   int i;     for(i=0 ; i<5 ; i++) {     sum+=fiveNumbers[i];            /* work out the total */   } 2
Background image of page 2
  return sum;                       /* return the total   */ } #include <stdio.h>   int factorial(int x);   int main()  {   int a, b=1, temp;
Background image of page 3

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

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

This note was uploaded on 12/03/2009 for the course INDUSTRIAL IE 307 taught by Professor Arzuakyüz during the Spring '09 term at Atılım Üniversitesi.

Page1 / 12

include - #include

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

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