Skip to content

Instantly share code, notes, and snippets.

@sorin-ref
Last active May 14, 2022 14:10
Show Gist options
  • Save sorin-ref/a149b01fc612c10e3f83b5ae4249fc2b to your computer and use it in GitHub Desktop.
Save sorin-ref/a149b01fc612c10e3f83b5ae4249fc2b to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
const int max = 10;
int numere[max], len = 0, n;
while (len < max && scanf("%d", &n) == 1)
{
numere[len++] = n;
if (len >= 10 || getchar() == '\n')
break;
}
for (int i = 0; i < len; i++)
{
printf("%d ", numere[i]);
}
printf("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment