• Share this text:
Report Abuse
Untitled - posted by guest on 15th December 2019 02:23:44 PM

DateTime ClockInfoFromSystem = DateTime.Now;

            string Giorno;

            string Mese;

            string Ora;

            string Minuto;

            string Val; //Valore finale

            int num = 0;

            Giorno = DateTime.Now.ToString("dd");

            Mese = DateTime.Now.ToString("MM");

            Ora = DateTime.Now.ToString("HH");

            Minuto = DateTime.Now.ToString("mm");

            Val = Giorno + Mese + Ora + Minuto;

            num = int.Parse(Val);

            num = num + 1;

            Console.WriteLine("Inserire numero");

            int ins = int.Parse(Console.ReadLine()); //Imput iniziale

            int final = ins;

            ins = ins-num;

            string temp = ins.ToString();

            Console.ReadLine();

            for(int i = 0; i<9; i++ )

            {

                Console.WriteLine(temp[i]);

                Console.ReadLine();

            }

            Console.WriteLine(temp);

            Console.ReadLine();

            Console.WriteLine("Ora facciamo " + final + '-' + ins);

            final = final - ins;

            Console.ReadLine();

            Console.WriteLine("Il risultato è " + final);

Report Abuse

Login or Register to edit or copy and save this text. It's free.