mardi 17 décembre 2019

I have created a program that cheers for players accordingly. If score is <=10 and >=1 and if it is 3 it should cheer "Ra!" Three times

using System;
using System.Text;
namespace cheer
{
    public class Cheer
    {
        public static void Main()
        {
            int score = Convert.ToInt32(Console.ReadLine());
            if (score > 10) { Console.WriteLine("High Five"); }
            if (score < 1) { Console.WriteLine("shh"); }
            if (score >= 1 && score <= 10)
            {
                for (int i = 0; i <= score; i++)
                {
                    Console.WriteLine("Ra!");
                }
            }
        }
    }
}

Aucun commentaire:

Enregistrer un commentaire