Skip to content

Instantly share code, notes, and snippets.

@obiPlabon
Last active April 18, 2017 11:58
Show Gist options
  • Save obiPlabon/0ccb1d28f39b5b47c5d2c6f3f676e312 to your computer and use it in GitHub Desktop.
Save obiPlabon/0ccb1d28f39b5b47c5d2c6f3f676e312 to your computer and use it in GitHub Desktop.
Reference
/**
* Answer 7
*/
#include <stdio.h>
void main()
{
int i, j;
int num[3][4] = {
{10,12,14,16},
{20,22,24,26},
{30,32,34,36}
};
for (i=0; i<3; i++)
{
for(j=0; j<4; j++)
{
printf("%d ", num[i][j]);
}
printf("\n");
}
}
/**
* Answer 5
*/
void main()
{
const int ELM_QTY = 12;
int i, j, nums[ELM_QTY];
for (i=0, j = 1; i < ELM_QTY; i++, j += 3)
{
nums[i] = j;
}
}
/**
* Answer 5
*/
#include <stdio.h>
void main()
{
int nums[] = {1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment