All pastes #210260 Raw Edit

Smith

public text v1 · immutable
#210260 ·published 2006-10-19 16:55 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;

namespace skola_pokus
{
    class Program
    {
        static void Main(string[] args)
        {
            string a;
            double i;

            Console.WriteLine("Zadejte číslo: ");
            a = Console.ReadLine();

            double b = Convert.ToDouble(a);
            
            do
            {
                if (b < 5)
                {
                    Console.WriteLine("Zadal jste &#269;íslo " + b);
                }
                else
                {
                    for (i = 0; i < 10; i++)
                    {
                        Console.WriteLine(i);
                    }
                }

                if (b >= 10)
                {
                    Console.WriteLine("Zadal jste &#269;íslo " + b + ". Toto &#269;íslo je v&#283;tší jak 10 a program kon&#269;í - ochrana proti zacyklení :D");
                    break;
                }

            } while (b > 10);
            
            Console.WriteLine("\n\nStiskn&#283;te klávesu Enter pro ukon&#269;ení aplikace");
            Console.ReadLine();
        }
    }
}