Laborator 2

Lab 2

Problema 1

Expresia 1: ( * (+ 25 30) (/ 15 2) )

Expresia 2: (* 6 3.1416)

Problema 2

( floor ( / ( / ( + 5 6.7 -23.2 75) 4 ) 100.3 ) )

Problema 3

( mod 365 12 )

( mod 13 467 )

Problema 4

Solutiile ecuatiei sunt: X1 = -1 si X2 = - 2.5

(+ (* 2 (EXPT -1 2) ) (* 7 -1) 5 )

(+ (* 2 (EXPT -2.5 2) ) (* 7 -2.5) 5 )

Problema 5

( 1+ ( floor ( / ( - ( * 5 2.25 ) 7.13 ) ( - 45 ( / 25 5) ) ) ) )

( 1- ( floor ( / ( - ( * 5 2.25 ) 7.13 ) ( - 45 ( / 25 5) ) ) ) )

( 1+ ( ceiling ( / ( - ( * 5 2.25 ) 7.13 ) ( - 45 ( / 25 5) ) ) ) )

( 1- ( ceiling ( / ( - ( * 5 2.25 ) 7.13 ) ( - 45 ( / 25 5) ) ) ) )

Problema 6

Randul 1: (MAX 3 4 5) = 5 ; (MIN 3 4 5) = 3 => ( * 5 3)=15

Randul 2: (MAX 3 1 4) = 4 ; (MAX 2 7 1) = 7 => (EXPT 4 7) = 16384

Randul 3: (+ 5 7 13) = 25 ; (-14 1) = 13 => (REM 25 13) = 12

Problema 7

(format t " restul impărțirii numerelor ~A si ~A este ~A.~%" 365 12 (mod 365 12) )

(format t " restul impărțirii numerelor ~A si ~A este ~A.~%" 13 467 (mod 13 467) )

Problema 8

( format t "a=" (read) )