miércoles, 21 de abril de 2010

expresiones y variables

Dadas las siguientes declaraciones:
TRES = 3

entero a = 5, b = 4
real x = 5e-2, y = 2.

¿qué valores se obtienen de evaluar las siguientes expresiones?
1) a = b mod TRES

2) 6 div TRES < TRES mod 6

3) TRES + b - 1 <> a o b >= -b * a y a ** 2 <= 10

4) x * y * 10 = 10.E-1

5) b mod a div TRES

6) no ( x * a > y / b )

¿CUÁLES DE LAS SIGUIENTES DECLARACIONES DE CONSTANTES Y VARIABLES SON CORRECTAS?
1) caracter = u
2) vocal = i
3) letra j
4) cadena = "nombre"
5) entero numero = 7.0
6) 888.8
7) cadena variable
8) verdadero
9) nueve = 9
10) logico CIERTO
11) interruptor = falso
12) _123 = "un dos tres"
13) real 40.09
14) barra = '\'
15) a = .9E-2
16) b = 6.e5
17) caracter v, w, x
18) CONSTANTE = " ¿ ? "

No hay comentarios:

Publicar un comentario