Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace MyProject
- {
- public class Program
- {
- static void MultiplyBy2(int[] arr) {
- for(int i = 0; i < arr.Length; ++i)
- {
- arr[i] *=2 ;
- }
- }
- public static void Main()
- {
- int[] arr = new int[]{1, 2, 3, 4, 5};
- MultiplyBy2(arr);
- for(int i = 0; i < arr.Length; ++i)
- {
- Console.WriteLine(arr[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement