Preview:
main()
{
  int num[3][4];
  int i. j;
  int total=0, average=0;
  
  printf("Enter 12 numbers:");
  for(i=0; i<=2; i++)
    for(j=0; j<=3; j++)
      {
      scanf("%d", &num[i][j]);
 		 total=total+num[i][j];
      }
  average=total/12;
  
  //display the content of the array
  for(i=0; i<=2; i++)
    for(j=0; j<=3; j++)
      printf("%d", num[i][j]);
  printf("\n");
  
  //display odd numbers
  printf("The odd numbers are:")
  for(i=0; i<=2; i++)
    {
    for(j=0; j<=3; j++)
      if(num[i][j]%2==1)
        printf("%d", num[i][j]);
    }
  
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter