Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <math.h>
- #include <time.h>
- #include <string.h>
- #include <windows.h>
- #include <locale.h>
- int main()
- {
- int i, x;
- int *v;
- printf("Informe o tamanho do vetor: ");
- scanf("%d", &x);
- v = (int *)malloc(x * sizeof(int));
- for (i =0; i < x; ++i)
- {
- v[i] = i;
- }
- for (i = 0; i < x; ++i)
- {
- printf("%d", v[i]);
- }
- printf("\n");
- free (v);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement