자료설명
[판매중지] 구매회원요청 판매중지(사유) : 실제 내용과 자료 설명이 다름 -------> [솔루션] 프로그래밍 언어론 2판(저자 Kenneth C. Louden, 2nd ed - Programming Languages - Principles and Practice) 솔루션 입니다.
총 1장부터 14장까지의 솔루션으로 구성되어 있습니다.
공부 할 때 정말 도움이 많이 됬던 자료 입니다. 예습할때나, 복습할때나 그리고 시험기간에 특히 꼭 필요한
본문/내용
Programming Languages - Principles and Practice 2nd Edition
by Kenneth C. Louden Thomson Brooks/Cole 2002
Answers to Selected Exercises
? Copyright Kenneth C. Louden 2002
Chapter 1
1.2. (a)
function numdigits(x: integer): integer; var t,n: integer; begin n :〓 1; t :〓 x; while t ]〓 10 do begin n :〓 n + 1; t :〓 t div 10; end; numdigits :〓 n; end;
(c)
numdigits x 〓 if x [ 10 then 1 else numdigits(x / 10) + 1
(e)
function numdigits(x: Integer) return Integer is t: Integer :〓 x; n: Integer :〓 1; begin while t ]〓 10 loop n :〓 n + 1; t :〓 t / 10; end loop; return n; end numdigits;
(g)
class NumDigits { public static int numdigits(int x) { int t 〓 x, n 〓 1; while (t ]〓 10) { n++; t 〓 t / 10; } return n; } }
Kenneth C. Louden
Programming Languages ? Principles and Practice 2nd Ed.
Answers - 2
1.5. (a) The remainder function, which we shall write here as % (some languages use rem or remainder), is defined by the integer equation a 〓 (a / b) * b …