Skip to content

Instantly share code, notes, and snippets.

@Tombo1001
Last active December 13, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tombo1001/4951814 to your computer and use it in GitHub Desktop.
Save Tombo1001/4951814 to your computer and use it in GitHub Desktop.
Basic arrays in C
#include <stdio.h>
void main()
{
int a[10], i, j, k;
for (i=0; i<=9; i++)
{
a[i];
}
for (j=0; j<=9; j++)
{
printf("a[%d]?" , i);
scanf("%d", &a[j]);
}
for(k=0; k<=9; k++)
{
printf("Number %d = %d\n", k+1, a[k]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment