This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[RequireComponent(typeof(Rigidbody))] | |
public class Bullet : MonoBehaviour | |
{ | |
private Rigidbody _rigidbody; | |
private float _speed; | |
private void Awake() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace BookStorage | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Storage storage = new Storage(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace CardDeck | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Player player = new Player(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace MergingIntoCollection | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string[] firstArray = { "Первый", "массив", "строк" }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ShiftArrayValues | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int[] array = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; | |
Console.Write("На сколько позиций сдвинуть массив: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Split | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string sentence = "Строка с текстом для получения массива слов"; | |
string[] words = sentence.Split(' '); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SortingNumbers | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int[] array = new int[10]; | |
Random random = new Random(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SubarrayOfNumbersRepetition | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int[] array = new int[30]; | |
Random random = new Random(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace BracketedExpression | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string expressionToCheck = "(()(()))()"; | |
bool isRight = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PowerOfTwo | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
const int Two = 2; | |
int number = new Random().Next(65536); |
NewerOlder