Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

HomeWork

// Домашнее задание_________

// Задание 1_________

// Напишите программу, которая на вход принимает два числа и выдает, какое число большее, а какое меньшее // а = 5; b = 7 -> max = 7 // a = 2; b = 10 -> max = 10 // a = -9; b = -3 -> max = -3

// Console.WriteLine("Введите число"); // int num = Convert.ToInt32(Console.ReadLine());

// Console.WriteLine("Введите число"); // int num2 = Convert.ToInt32(Console.ReadLine());

// if (num>num2) // { // Console.WriteLine(num); // } // else // { // Console.WriteLine(num2); // }

// Задача 2______

// Напишите программу, которая принимает на вход три числа и выдаёт максимальное из этих чисел. // 2, 3, 7 -> 7 // 44 5 78 -> 78 // 22 3 9 -> 22

// Console.WriteLine("Введите число"); // int num = Convert.ToInt32(Console.ReadLine());

// Console.WriteLine("Введите число"); // int num2 = Convert.ToInt32(Console.ReadLine());

// Console.WriteLine("Введите число"); // int num3 = Convert.ToInt32(Console.ReadLine()); // int max = 0;

// if (num>num2) // { // max = num; // } // else // { // max = num2;

// }

// if (max > num3) // { // Console.WriteLine(max); // } // else // { // Console.WriteLine(num3); // }

// Задача 3_______

// Напишите программу, которая на вход принимает число и выдаёт, является ли число чётным (делится ли оно на два без остатка). // 4 -> да // -3 -> нет // 7 -> нет

// Console.WriteLine("Введите число"); // int num = Convert.ToInt32(Console.ReadLine());

// if (0 == num%2) // { // Console.WriteLine("Да"); // } // else // { // Console.WriteLine("Нет"); // }

// Задача 4________________

// Напишите программу, которая на вход принимает число (N), а на выходе показывает все чётные числа от 1 до N. // 5 -> 2, 4 // 8 -> 2, 4, 6, 8

// Console.WriteLine("Введите число"); // int num = Convert.ToInt32(Console.ReadLine()); // int evenNumber = 2;

// while (evenNumber <= num) // { // Console.WriteLine(evenNumber); // evenNumber = evenNumber + 2; // }

HomeWork1

About

Репозиторий Учащегося

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors