-
Lenguaje
FreeBasic/QBasic
-
Descripción
Se desea conocer una serie de datos de una empresa con 50 empleados:
a) Cuántos empleados ganan mas de 300.000 pesetas al mes (salarios altos).
b) Entre 100.000 y 300.00 peseta (salarios medios).
c) Menos de 100.000 en pestas (salarios bajo y empleados a tiempo parcial).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Dim a As Integer, b As Integer, c As Integer, i As Integer
Dim salario As Double
a = 0
b = 0
c = 0
For i = 1 To 50
Print "PROCESO " & i
Input "Ingresa el valor de salario: ", salario
If salario>300000 Then
a=a+1
End If
If salario>=100000 And salario<=300000 Then
b=b+1
End If
If salario<100000 Then
c=c+1
End If
Print
Next i
Print "Valor de a: " & a
Print "Valor de b: " & b
Print "Valor de c: " & c
Shell ("pause")
Dim salario As Double
a = 0
b = 0
c = 0
For i = 1 To 50
Print "PROCESO " & i
Input "Ingresa el valor de salario: ", salario
If salario>300000 Then
a=a+1
End If
If salario>=100000 And salario<=300000 Then
b=b+1
End If
If salario<100000 Then
c=c+1
End If
Next i
Print "Valor de a: " & a
Print "Valor de b: " & b
Print "Valor de c: " & c
Shell ("pause")