7.将下列数学式子写成Visual Basic表达式: (1)cos2(c d) (2)5 (a b)2 (3)cos(x)(sin(x) 1) (4)e2 2 (5)2a(7 b) (6)8e3ln2 解答:(1)Cos(c d)∧2 或Cos(c d)*Cos(c d) (2) 5 (a b)∧2 或5 (a b)*(a b) (3) Cos(x)*(Sin(x) 1) (4) Exp(2) 2 (5) 2*a*(7 b) (6) 8*Exp(3)*Log(2) 注:假定上面(1)和(3)中的c d和x为弧度,如果为度则应转换为弧度。
8.设a=2,b=3,c=4,d=5,求下列表达式的值: (1) a>b AND C<=d OR 2*a>C (2) 3>2*b OR a=c AND b<>c OR C>d (3) NOT a<=c OR 4*c=b∧2 AND b<>a c 解答:(1)False (2) False (3)False 9.写出下列函数的值 (1)lnt(-3.14159) (2)Sqr(Sqr(64)) (3) Fix(-3.14159) (4) Int(Abs(99-100)/2)