JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
23 days ago1 views
👨‍💻Programming

Untitled Page

/*
 * using System;

class Program
{
    static void Main()
    {
        long n = long.Parse(Console.ReadLine());

        if (n < 0)
        {
            n = -n;
        }

        Console.WriteLine($"The absolute value of the number is: {n}.");
    }
}

*/








/*
    using System;

class Program
{
    static void Main()
    {
        long num = long.Parse(Console.ReadLine());

        if (num % 2 == 0)
        {
            Console.WriteLine($"{num} is an even number");
        }
        else
        {
            Console.WriteLine($"{num} is an odd number");
        }
    }
}

*/




/*
   using System;

class Program
{
    static void Main()
    {
        int num = int.Parse(Console.ReadLine());

        switch (num)
        {
            case 1:
                Console.WriteLine("Monday");
                break;
            case 2:
                Console.WriteLine("Tuesday");
                break;
            case 3:
                Console.WriteLine("Wednesday");
                break;
            case 4:
                Console.WriteLine("Thursday");
                break;
            case 5:
                Console.WriteLine("Friday");
                break;
            case 6:
                Console.WriteLine("Saturday");
                break;
            case 7:
                Console.WriteLine("Sunday");
                break;
            default:
                Console.WriteLine("This day doesn't exist!");
                break;
        }
    }
}
*/









/*  
     using System;

class Program
{
    static void Main()
    {
        int temperature = int.Parse(Console.ReadLine());
        int wind = int.Parse(Console.ReadLine());
        int isRaining = int.Parse(Console.ReadLine());

        // 1. Определяне на категорията на температурата
        if (temperature < 0)
        {
            Console.WriteLine("Cold");
        }
        else if (temperature <= 25)
        {
            Console.WriteLine("Mild");
        }
        else
        {
            Console.WriteLine("Hot");
        }

        // 2. Проверка за предупреждения чрез три самостоятелни if оператора
        if (temperature < 0)
        {
            Console.WriteLine("Frost warning");
        }
        if (wind >= 40)
        {
            Console.WriteLine("Strong wind warning");
        }
        if (isRaining == 1)
        {
            Console.WriteLine("Rain warning");
        }
    }
}*/






using System;

class Program
{
    static void Main()
    {
        int balance = int.Parse(Console.ReadLine());
        int amount = int.Parse(Console.ReadLine());

        if (amount > 0)
        {
            if (amount % 10 == 0)
            {
                if (amount <= balance)
                {
                    int remainingBalance = balance - amount;
                    Console.WriteLine($"Withdrawal successful. Remaining balance: {remainingBalance}.");
                }
                else
                {
                    Console.WriteLine("Insufficient funds.");
                }
            }
            else
            {
                Console.WriteLine("Amount must be divisible by 10.");
            }
        }
        else
        {
            Console.WriteLine("Invalid amount.");
        }
    }
}
← Back to timeline