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; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string showMessage1 = "1"; | |
string showMessage2 = "2"; | |
string showRandomNumber = "3"; | |
string clearConsole = "4"; |
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; | |
class Program | |
{ | |
static void Main() | |
{ | |
int minNumber = 1; | |
int maxNumber = 101; | |
int divisorThree = 3; | |
int divisorFive = 5; |
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; | |
class Program | |
{ | |
static void Main() | |
{ | |
int start = 5; | |
int step = 7; | |
int max = 103; | |
int currentValue = start; |
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
namespace ConsoleApp2 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int age = 18; | |
int countOfPets = 1; | |
double height = 1.73; | |
float weight = 61.5f; |
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
Данный код выведет 0. Почему: | |
вычисление значения выражения (31 - 5*a): | |
a = 10, поэтому 5*a = 50, a 31 - 50 = -19 | |
вычисление значения выражения (-19/38): | |
банальное деление. ответ: -0,5. в данном случае деление является целочисленным, поэтому ответом является число 0 |
NewerOlder