Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int v[10000], n, j = 1, i, x, nr = 0, k;
- printf("Numarul de zile: "); scanf("%d", &n);
- printf("Suma de bani: "); scanf("%d", &k);
- for (i = 1; i <= n; i++) {
- nr += i;
- printf("Pretul din ziua %d", i); scanf("%d", &x);
- while (j <= nr) {
- v[j] = x;
- j++;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment