본문 바로가기
코딩테스트/해커랭크

[easy] The World of Numbers(with shell)

by mozi2 2022. 9. 29.
반응형

 

*problem*

Given two integers,  and , find their sum, difference, product, and quotient.

*Input Format*

Two lines containing one integer each ( and , respectively).

 

*Output Format*

Four lines containing the sum (), difference (), product (), and quotient (), respectively.
(While computing the quotient, print only the integer part.)

*Answer*

더보기
read x;
read y;
 
echo "$((x+y))";
echo "$((x-y))";
echo "$((x*y))";
echo "$((x/y))";

 

728x90
반응형