Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Homework21_1
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int[] bag = new int[1] { 45 };
- int[] tempBag = new int[bag.Length + 1];
- for(int i = 0; i < bag.Length; i++)
- {
- tempBag[i] = bag[i];
- Console.WriteLine(bag[i]);
- }
- tempBag[tempBag.Length - 1] = 78;
- bag = tempBag;
- for (int i = 0; i < bag.Length; i++)
- {
- Console.WriteLine(bag[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement