kitsu.cs

  Page 1 of 1  1
October 5, 2016 10:43am
I really like my C# class
I like it so much I wrote a program to calculate a kitsune's tails

Code:
using System;
using static System.Console;
{
  namespace Kitsune {
    Main ()
    {
      string fox;
      int tailCount;
      int age;

      Write("Fox name : ");
      fox = ReadLine();

      Write(" Years lived : ");
      age = Convert.ToInt32(ReadLine());
     
      tailCount = (int)(Math.sqrt(age/10)+1);

      if(tailCount>9)
      {
          tailCount=9;
      }
     
      WriteLine("{0} has {1} tails and is {2} years old",fox,tailCount,age);
    }
  }
}
You do seem to know what is needed. Yes, what a Trainer needs is a virtuous heart. Pokémon touch the good hearts of Trainers and learn good from wrong. They touch the good hearts of Trainers and grow strong... Go onwards! The Champion is waiting!
- Drake of the Hoenn Elite Four

CaRSP aRiEWoVLotE
October 5, 2016 1:23pm
I don't know much about coding (because im not a nerd) but this is cool.
"Roots starve in gravel, but the dust staves your hunger;
it works its way under your nails and laces itself in your bones.
the stars that watch over you now are strangers - but with time you'll know them, and they you, and
they'll take the compass in your breast pocket
and point it home." - Twiggy, Secret Series
  Page 1 of 1  1