Advertisement
ajreuri23

שאלה 13

Dec 1st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. int[] a = new int[20];
  4. int i, j = 0, f, x, w;
  5. for (i = 0; i < 20; i++)
  6. {
  7. a[i] = int.Parse(Console.ReadLine());
  8. }
  9. for (f = 0; f < 20; f++)
  10. {
  11. j = 0;
  12. for (x = 0; x < f; x++)
  13. {
  14. j += a[f];
  15. }
  16. a[f] = j;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement