Skip to content

Instantly share code, notes, and snippets.

@whyrusleeping
Created October 6, 2012 01:06
Show Gist options
  • Save whyrusleeping/3843323 to your computer and use it in GitHub Desktop.
Save whyrusleeping/3843323 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#define FILL(arr,n,eq) for(int i = 0; i < n; i++) arr[i] = eq;
#define to ; i <=
#define DO(range) for(int i = range; i++)
int main()
{
int myArray[30];
FILL(myArray,30,2*i + 7)
DO(0 to 29)
printf("%d\n",myArray[i]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment