본문 바로가기
알고리즘

[BAEKJOON] 2372 Livestock Count

by mAlfred 2023. 12. 1.
반응형

문제

Print a table that describes the current count of all your livestock.

출력

Print the table below as shown. The character “-”, is a dash not an underscore.

예제 입력 1 복사

예제 출력 1 복사

Animal      Count
-----------------
Chickens      100
Clydesdales     5
Cows           40
Goats          22
Steers          2

 


와... Ada 언어는 또 뭔가 싶었다..

 

Ada Programming Language | Ada Programming Language (ada-lang.io)

 

Ada Programming Language | Ada Programming Language

A programming language for readable, correct, and performant software.

ada-lang.io

 

문서 보고 호다닥 작성햇다.

 

with Ada.Text_IO;

procedure Livestock is
begin
    Ada.Text_IO.Put_Line ("Animal      Count");
    Ada.Text_IO.Put_Line ("-----------------");
    Ada.Text_IO.Put_Line ("Chickens      100");
    Ada.Text_IO.Put_Line ("Clydesdales     5");
    Ada.Text_IO.Put_Line ("Cows           40");
    Ada.Text_IO.Put_Line ("Goats          22");
    Ada.Text_IO.Put_Line ("Steers          2");
end Livestock;

 

뭐랄까 sql 프로시저 작성하는 느낌이였다.

반응형

'알고리즘' 카테고리의 다른 글

[BAEKJOON] 2393 Rook  (0) 2023.12.01
[BAEKJOON] 2377 Pottery  (0) 2023.12.01
[BAEKJOON] 1809 Moo  (0) 2023.12.01
[BAEKJOON] 1271 엄청난 부자2  (0) 2023.11.30
[BAEKJOON] 2338 긴자리 계산  (0) 2023.11.30