반응형
2372번: Livestock Count (acmicpc.net)
2372번: Livestock Count
Print the table below as shown. The character “-”, is a dash not an underscore.
www.acmicpc.net
풀이
브론즈 5 수준의 문제인 것은 맞지만, 제출 언어가 Ada로 고정되어 있습니다.
Ada 문법을 모르면 문제를 해결할 수 없으므로, 인터넷에 문법을 검색해 가며 풀었습니다.
with Ada.Text_IO; use Ada.Text_IO;는 C언어의 #include <stdio.h>와 비슷해 보입니다.
그리고 procedure hello is, begin과 end는 하나의 함수처럼 보이네요.
Put_Line은 printf, cout의 역할을 하는 것으로 보입니다.
with Ada.Text_IO; use Ada.Text_IO;
procedure hello 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 hello;
반응형
'📊 알고리즘' 카테고리의 다른 글
[백준] 2547 - 사탕 선생 고창영 (0) | 2022.12.23 |
---|---|
[백준] 2377 - Pottery (0) | 2022.12.22 |
[백준] 9012 - 괄호 (0) | 2022.12.20 |
[백준] 10798 - 세로읽기 (0) | 2022.12.19 |
[백준] 2839 - 설탕 배달 (0) | 2022.12.18 |