Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculate the degrees that form between the hands of a clock
#1
REM "ESTE PROGRAMA CALCULA LOS GRADOS APROX. QUE FORMAN ENTRE LAS AGUJAS DE UN RELOJ DE 12 HORAS"

REM "THIS PROGRAM CALCULATE THE GRADES APROX. ARE FORMING BETWEEN THE NEEDLES OF A 12-HOUR CLOCK"

REM "LRCVS 09.08.08"

Attention:
The programme for the calculus that copy dated 07.08.08 was wrong.

>>>>>>>This is the correct program

cls
'aqui solicitamos la hora
'here when asked hour
input "hora / hour ( hhmmss ) = "; hini$

'aqui comprobamos su longitud
'here we see their length
lhini = len(hini$)
if lhini < 6 then cls : print "error": beep

'aqui comprobamos y ajustamos horarios de 24 hor
'here check and adjust schedules of 24 hours
hor$ = left$(hini$, 2)
if val(hor$) > 24 then print "error": beep
if val(hor$) = 24 then hor$ = "00"

'aqui comprobamos y ajustamos horarios de 12 hor
'here check and adjust schedules of 12 hours
if val(hor$) > 12 then hor$ = ltrim$(str$((val(hor$) - 12)))
if val(hor$) = 12 then hor$ = "00"

'aqui comprobamos los minutos
'here we check the minutes
min$ = mid$(hini$, 3, 2)
if val(min$) > 59 then print "error": beep

'aqui comprobamos los segundos
'here we check the second                           
seg$ = right$(hini$, 2)
if val(seg$) > 59 then print "error": beep

'aqui calculamos los segundos que tienen las horas, minutos, segundos
'here we estimate that the latter are the hours, minutes, seconds
seghor# = val(hor$) * 60 * 60
segmin# = val(min$) * 60
segseg# = val(seg$) * 1

'aqui calculamos los segundos totales
'here we estimate total seconds
segtot# = seghor# + segmin# + segseg#

'esto son los segundos que hay en 12 hor
'This is the second there in 12 hours
segtot360# = 43200

'aqui calculamos el angulo que hace la aguja de las horas
'here we calculate the angle that makes the needle of Hours
anghor# = (360 * (seghor# + segmin# + segseg#)) / segtot360#

'aqui calculamos el angulo que hace la aguja de los minutos
'here we calculate the angle that makes the needle minutes
angmin# = ((360 * (segmin# + segseg#)) / segtot360#) * 12

'aqui calculamos la diferencia entre el angulo de las horas y el de los minutos
'here we calculate the difference between the corner of the hours and minutes
angtot# = abs((anghor#) - angmin#)

ag = int(angtot#)

b = angtot# - ag
mn = int((b * 60))

c = b * 60
d = c - int©
e = d * 60

print
'Total corner between needles ="
print "angulo total entre agujas = "; angtot#; " grd"

print
'Also =
print "tambien = "; ag; " grd "; mn; " min "; e; " seg"




Reply
#2
lrcvs wrote, for his subject:
[quote]
CALCULATE THE GRADES ARE FORMING BETWEEN THE NEEDLES OF A CLOCK
« on: August 07, 2008
[\quote]

A better translation is:
"Calculate the degrees that form between the hands of a clock"
In Spanish, "grade" and "degree" are both "grado"!  And, the "hands" of a clock are called "agujas", which in English transltes as "needles".  Ahh, these electronic translators don't understand context...yet.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#3
Hi, Ralph !

Ok, you are absolutely right, electronic translators do not understand the context of the text.

Greetings from Spain
Reply
#4
¿En cuál parte de España vive usted?
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#5
Hola Ralph!

Su español es muy bueno.!!!

Vivo en la ciudad de Murcia, a unos 40 Km. del Mar Mediterraneo.

De que paises hay en los forums de QBasic / Free Basic ?

Hay mas españoles en el forum a parte de mi?

Nota, su frase : ¿En cuál parte de España vive usted?

Es mas correcto decir : En QUE parte de España vive usted? / Donde vives? / Donde vive usted?

Saludos / Un saludo = Adios = Good Bye

Now in English:

Hi, Ralph!

Your Spanish is very good.!

I live in the city of Murcia, about 40 km from the Mediterranean Sea.

In countries that are in the forums QBasic / Free Basic?

There are more Spaniards besides me?

Note, his sentence: In which part of Spain you live?

It is more correct to say: In that part of Spain you live? / Where you live? / Where you live?
Reply
#6
What follows is simply a comparison between some of the words that the OP's electronic translator and mine (a human).

lrcbs (Luis Rafael?):

Your first two lines, namely, "Hi, Ralph", and the next one are perfect English.  The following ones are not:
In countries that are in the forums QBasic / Free Basic?

There are more Spaniards besides me?  Debe ser:
Are there more Spaniardd, besides myself?

Note, his sentence: In which part of Spain you live?  Debe ser:
Note, YOUR (En inglés, no hay distinción entre los dos pronombres posesivos, “su” y “tu”, los dos son "your"; pero, el  resto de la frase está bien).

It is more correct to say: In that part of Spain you live? / Where you live? / Where you live?  Debe ser:
It is more correct to say: In WHAT part of Spain DO you live?/ Where  DO you live? / (ídem).

Las correciones de arriba son solamente para ilustrar las diferencias entre su traductor español/inglés y un traductor humano.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)