본문 바로가기
C#프로그래밍

구구단 2

by 노재두내 2023. 7. 20.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.SymbolStore;
using System.Runtime.CompilerServices;

namespace LearnDotnet
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.Write("구구단의 단수를 입력하세요:");
            string input = Console.ReadLine();
            
            int intInput = Convert.ToInt32(input);
            
            for (int i = 0; i < 9; i++)
            {
                Console.WriteLine("{0} X {1} = {2}",intInput,i+1,intInput*(i+1));
                
            }
           
            Console.Write("*구구단의 단수 1<= n <= 9");
        }
    }
}

'C#프로그래밍' 카테고리의 다른 글

몬스터 공격  (0) 2023.07.20
줄넘기2  (0) 2023.07.20
홀짝  (0) 2023.07.20
for문 -줄넘기  (0) 2023.07.20
스타크래프트  (0) 2023.07.19