본문 바로가기
JAVA/Coding Test Study

[Bronze V] 백준 - 2372. Livestock Count : Ada

by ♡˖GYURI˖♡ 2023. 12. 19.
728x90
 

2372번: Livestock Count

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

www.acmicpc.net

 

 

문제 : 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.

예제 : 

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

 

with Ada.Text_IO; use Ada.Text_IO;

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

 

 

Ada라는 언어가 생소해서 따로 찾아봐야 했다.

 

 

Ada 프로그램의 기본 구조

with Package_Name; use Package_Name;
procedure Program_Name is
	Variable : Some_Type;
begin
	Statement1;
    Statement2;
end Program_Name;

 

 


참고