Advertisement
3vo

Allocate array

3vo
Mar 16th, 2023
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Allocate array
  3. Description
  4.  
  5. Write a program that allocates array of N integers, initializes each element by its index multiplied by 5 and the prints the obtained array on the console.
  6. Input
  7.  
  8.     On the only line you will receive the number N
  9.  
  10. Output
  11.  
  12.     Print the obtained array on the console.
  13.         Each number should be on a new line
  14.  
  15. Constraints
  16.  
  17.     1 <= N <= 20
  18.     N will always be a valid integer number
  19.  
  20. Sample tests
  21. Input   Output
  22. 5   0
  23. 5
  24. 10
  25. 15
  26. 20
  27. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement