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

23/07/20 퀴즈7

by 잰쟁 2023. 7. 20.
728x90

(과제 내용)

구구단의 단수를 입력하세요: 3
3 X 1 = 1
3 X 2 = 2
3 X 3 = 3
3 X 4 = 4
3 X 5 = 5
3 X 6 = 6
3 X 7 = 7
3 X 8 = 8
3 X 9 = 9

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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.WriteLine("*구구단의 단수 1<= n <= 9");



        }
    }
}
    }
}

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

23/07/20 퀴즈9  (0) 2023.07.20
23/07/20 퀴즈8  (0) 2023.07.20
23/07/20 퀴즈6  (0) 2023.07.20
23/07/20 퀴즈5  (0) 2023.07.20
23/07/20 퀴즈4  (0) 2023.07.20