Last active
May 14, 2022 14:10
-
-
Save sorin-ref/a149b01fc612c10e3f83b5ae4249fc2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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