using System;
class Program
{
static void Main()
{
Console.Write("Введите число от 1 до 100: ");
int number = Convert.ToInt32(Console.ReadLine());
if (number < 1 || number > 100)
{
Console.WriteLine("Ошибка: число должно быть в диапазоне от 1 до 100");
}
else
{
if (number % 3 == 0 && number % 5 == 0)
{
Console.WriteLine("Fizz Buzz");
}
else if (number % 3 == 0)
{
Console.WriteLine("Fizz");
}
else if (number % 5 == 0)
{
Console.WriteLine("Buzz");
}
else
{
Console.WriteLine(number);
}
}
}
}
using System;
class Program
{
static void Main()
{
Console.Write("Введите число: ");
double number = Convert.ToDouble(Console.ReadLine());
Console.Write("Введите процент, который нужно найти: ");
double percent = Convert.ToDouble(Console.ReadLine());
double result = (number * percent) / 100;
Console.WriteLine($"{percent}% от {number} = {result}");
}
}
using System;
class Program
{
static void Main()
{
Console.Write("Введите первую цифру: ");
int a = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите вторую цифру: ");
int b = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите третью цифру: ");
int c = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите четвёртую цифру: ");
int d = Convert.ToInt32(Console.ReadLine());
int result = a * 1000 + b * 100 + c * 10 + d;
Console.WriteLine("Полученное число: " + result);
}
}