06-24-2018, 10:49 AM
(06-24-2018 01:08 AM)Wes Loewer Wrote: [ -> ]Pronunciation is important.
She said, "one thousand five hundred milligrams."
See, I would say that number as just fifteen hundred , not one thousand, five hundred
(06-24-2018 01:08 AM)Wes Loewer Wrote: [ -> ]Pronunciation is important.
She said, "one thousand five hundred milligrams."
10 CLS: KEYOFF: CLEAR 500: DIM MU$(19),M$(11)
15 PRINT CHR$(27);"Z"
20 K=1000000#
30 FOR I=0 TO 19
40 READ MU$(I)
50 NEXT
60 FOR I=0 TO 9
70 READ MD$(I),MC$(I)
80 NEXT
90 FOR I=0 TO 11
100 READ M$(I)
110 NEXT
120 CLS:X$=""
130 INPUT " Quantia ";N
140 INPUT "Data (DD,MM,AA) ";D,M,A
150 LINEINPUT "A: ";P$
160 IF A=0 THEN A=92
170 IF N=0 THEN 710
180 CV=(N-INT(N))*100
190 GOSUB 930
200 IF N<1 THEN 420
210 IF N>1.99 THEN N$="S" ELSE N$=""
220 CN=INT((N/1000-INT(N/1000))*1000)
230 MR=INT(((N/K-INT(N/K))*K)/1000)
240 CT=INT(N/K)
250 IF CT=0 THEN 290
260 GOSUB 730
270 IF CT>1 THEN X$=X$+" MILHÕES " ELSE X$=X$+" MILHÃO "
280 IF MR=0 AND CN=0 THEN X$=X$+"DE "
290 IF MR=0 THEN 340
300 IF CT>0 AND CN=0 AND (MR<100 OR MR MOD 100=0) THEN X$=X$+"E "
310 CT=MR
320 GOSUB 730
330 X$=X$+" MIL "
340 IF CN=0 THEN 390
350 IF N>1000 AND (CN<100 OR CN MOD 100=0) THEN X$=X$+"E "
360 CT=CN
370 GOSUB 730
380 X$=X$+" "
390 X$=X$+"CRUZEIRO"+N$
400 IF CV=0 THEN 460
410 X$=X$+" E "
420 IF CV<>1 THEN N$="S" ELSE N$=""
430 CT=CV
440 GOSUB 730
450 X$=X$+" CENTAVO"+N$
460 PRINT TAB(10);
470 IF LEN(X$)<57 THEN GOSUB 840: GOTO 640
480 FOR I=56 TO 42 STEP -1
490 IF MID$(X$,I,1)=" " THEN 510
500 NEXT
510 NC=I-1
520 FOR I=1 TO 56-NC
530 PRINT "*";
540 NEXT
550 PRINT " ";
560 FOR I=1 TO LEN(X$)
570 PRINT MID$(X$,I,1);
580 IF I=NC+1 THEN PRINT
590 NEXT
600 PRINT " ";
610 FOR I=1 TO 67+NC-LEN(X$)
620 PRINT "*";
630 NEXT
640 PRINT: PRINT " ";P$
650 PRINT TAB(32)"Curitiba,";: IF D=1 THEN PRINT" 1§"; ELSE PRINT USING"###";D;
660 PRINT TAB(48)M$(M-1); TAB(64)A
670 PRINT: PRINT
680 PRINT "Outro cheque? "
690 A$=INKEY$
700 IF A$<>"S" AND A$<>"s" AND A$<>"N" AND A$<>"n" THEN 690
710 IF A$="S" OR A$="s" THEN 120
720 END
730 DZ=(CT/100-INT(CT/100))*100
740 UN=(DZ/10-INT(DZ/10))*10
750 IF CT=100 AND DZ=0 THEN X$=X$+"CEM": GOTO 830
760 IF CT/100<1 THEN 790
770 X$=X$+MC$(CT/100)
780 IF DZ>0 THEN X$=X$+" E "
790 IF DZ<20 THEN X$=X$+MU$(DZ): GOTO 830
800 X$=X$+MD$(DZ/10)
810 IF UN>0 THEN X$=X$+" E "
820 X$=X$+MU$(UN)
830 RETURN
840 FOR I=1 TO LEN(X$)
850 PRINT MID$(X$,I,1);
860 NEXT
870 PRINT " ";
880 FOR I=1 TO 123-LEN(X$)
890 PRINT "*";
900 IF I=56-LEN(X$) THEN PRINT
910 NEXT
920 RETURN
930 ND=LOG(N)/LOG(10)+1
940 Q$=STR$(N)
950 IF CV=0 THEN Q$=Q$+".00"
960 PRINT TAB(52);
970 FOR I=1 TO 16-LEN(Q$)-(ND-1)\3
980 PRINT "*";
990 NEXT
1000 PRINT TAB((66-LEN(Q$))-(ND-1)\3)
1010 CD=ND MOD 3
1020 IF CD=0 THEN CD=3
1030 FOR I=1 TO ND
1040 PRINT MID$(Q$,I+1,1);
1050 IF I=CD AND CD<ND-1 THEN PRINT ".";: CD=CD+3
1060 NEXT
1070 PRINT ",";
1080 PRINT MID$(Q$,I+2,2)
1090 PRINT
1100 RETURN
1110 DATA ,UM,DOIS,TRÊS,QUATRO,CINCO,SEIS,SETE,OITO,NOVE,DEZ,ONZE,DOZE,TREZE,QUATORZE,QUINZE,DEZESSEIS,DEZESETE,DEZOITO,DEZENOVE
1120 DATA ,,,CENTO,VINTE,DUZENTOS,TRINTA,TREZENTOS,QUARENTA,QUATROCENTOS,CINQÜENTA,QUINHENTOS,SESSENTA,SEISCENTOS,SETENTA,SETECENTOS,OITENTA,OITOCENTOS,NOVENTA,NOVECENTOS
1130 DATA Janeiro,Fevereiro,Março,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro
(06-23-2018 10:48 AM)Don Shepherd Wrote: [ -> ]When numbers are spoken, how should they be pronounced?
The math textbooks I have used in the past say that 126.544 should be pronounced as "one hundred twenty-six and five hundred forty-four thousandths," using "and" to represent the decimal point. But many would say "one hundred and twenty-six point five four four".
(06-23-2018 07:43 PM)ttw Wrote: [ -> ]Eleven thousand eleven hundred and one.
(06-23-2018 01:19 PM)Don Shepherd Wrote: [ -> ]How would you write that as a number?
12111
Eleven thousand: 11000
Eleven hundred: 1100
And one: 1
= 12101
(06-24-2018 06:36 PM)Gerson W. Barbosa Wrote: [ -> ]BTW, has anyone here also written a program to fill checks (or cheques), but in English?
I am interested in the full numbers routine. Who still fills checks these days?
\<<
@ digits
{ "one" "two" "three" "four" "five" "six" "seven"
"eight" "nine" }
@ teens
{ "ten" "eleven" "twelve" "thirteen" "fourteen"
"fifteen" "sixteen" "seventeen" "eighteen"
"nineteen" }
@ tens
{ "twenty" "thirty" "forty" "fifty" "sixty" "seventy"
"eighty" "ninety" }
@ magnitude
{ "thousand" "million" "billion" "trillion" "quadrillion"
"quintillion" "sextillion" "septillion" "octillion"
"nonillion" "decillion" "undecillion" "duodecillion"
"tredecillion" }
@ subroutine to append string with preceding space if appropriate
\<<
OVER SIZE { " " SWAP + } IFT +
\>>
\-> digits teens tens magnitude addstr
\<<
@ discard fractional value if real (for RPL)
IF
DUP TYPE NOT
THEN
IP
END
@ translate to zero if appropriate, otherwise proceed
IF
DUP NOT
THEN
DROP "zero"
ELSE
@ retain sign
DUP SIGN SWAP ABS
@ pre-load stack with magnitude, initial string
0. "" ROT
@ process triples until done
WHILE
DUP
REPEAT
@ get next triple
1000 IDIV2
@ split triple into hundreds and remainder
100 IDIV2
@ convert hundreds of this triple
SWAP
IF
DUP
THEN
digits SWAP GET
" hundred" +
ELSE
DROP ""
END
@ convert remainder digits of this triple
SWAP
IF
DUP
THEN
CASE
10 OVER > THEN
digits SWAP GET addstr EVAL
END
20 OVER > THEN
teens SWAP 9. - GET addstr EVAL
END
10 IDIV2 SWAP
tens SWAP 1. - GET ROT SWAP addstr EVAL
SWAP
IF
DUP
THEN
digits SWAP GET
"-" SWAP + +
ELSE
DROP
END
END
ELSE
DROP
END
@ add magnitude if appropriate
4. ROLL
IF
OVER SIZE OVER AND
THEN
" " magnitude PICK3 GET +
ROT SWAP + SWAP
END
1. + 4. ROLLD
ROT
@ accumulate new triple into final string
IF
OVER SIZE
OVER SIZE AND
THEN
" " SWAP +
END
+
SWAP
END
@ drop temporary stack values
ROT DROP2
@ prepend "negative" if appropriate
IF
SWAP 0. <
THEN
"negative " SWAP +
END
END
\>>
\>>
(06-25-2018 05:20 AM)cyrille de brébisson Wrote: [ -> ]126.544
Cent vintgt-quatre virgule cinq cent quarante-quatre
(06-25-2018 05:20 AM)cyrille de brébisson Wrote: [ -> ]And I leave you with one of the most wonderfull numbers of the French language:
98 = Quatre-vingt-dix-huit or: For Twenty and ten eight! How wonderful!
(06-23-2018 07:35 PM)Thomas Okken Wrote: [ -> ]I've also heard "Drei Viertel Zwei," meaning a quarter to two, or three quarters of the way to two (from one), but that doesn't seem to be very common.
(06-23-2018 07:35 PM)Thomas Okken Wrote: [ -> ]"Viertel vor Zwei" is what I would use.
(06-25-2018 03:27 AM)DavidM Wrote: [ -> ]This is a messy-and-dirty RPL transcription of a routine I once used to create the text of the "body amount" of a check-printing application. I didn't bother including the cents part of the routine, as it merely generated "and xx/100" (xx being the two digits after the radix mark).
(06-25-2018 12:34 PM)Gerson W. Barbosa Wrote: [ -> ]Also, that matches my understanding of "billion".
(06-25-2018 12:55 PM)grsbanks Wrote: [ -> ]One billion used to be understood as \(1000000^2\), one trillion as \(1000000^3\), one quadrillion as \(1000000^4\) etc. So, 3333333333 would have been "three thousand three hundred and thirty-three million three hundred and thirty-three thousand three hundred and thirty-three."
The "three billion three hundred and thirty-three million […]" number would have been written: 3000333333333.
Thankfully, this is more and more seldom the case and we're falling in line with the rest of the world so that there are fewer cases of misunderstanding.
(06-25-2018 05:20 AM)cyrille de brébisson Wrote: [ -> ]And I leave you with one of the most wonderfull numbers of the French language:
98 = Quatre-vingt-dix-huit or: For Twenty and ten eight! How wonderful!
(06-25-2018 01:25 PM)rprosperi Wrote: [ -> ](06-25-2018 05:20 AM)cyrille de brébisson Wrote: [ -> ]And I leave you with one of the most wonderfull numbers of the French language:
98 = Quatre-vingt-dix-huit or: For Twenty and ten eight! How wonderful!
Isn't Twenty and ten eight = 100, not 98?
(06-25-2018 01:22 PM)DavidM Wrote: [ -> ](06-25-2018 12:55 PM)grsbanks Wrote: [ -> ]One billion used to be understood as \(1000000^2\), one trillion as \(1000000^3\), one quadrillion as \(1000000^4\) etc. So, 3333333333 would have been "three thousand three hundred and thirty-three million three hundred and thirty-three thousand three hundred and thirty-three."
The "three billion three hundred and thirty-three million […]" number would have been written: 3000333333333.
Thankfully, this is more and more seldom the case and we're falling in line with the rest of the world so that there are fewer cases of misunderstanding.
I'm reminded of Ira Gershwin's lyrics to "Let's Call the Whole Thing Off"... which of course can't be fully appreciated in written form, since it's the differences in pronunciation which give the song its character.
Perhaps we should just all adopt Roman Numerals as the standard and be done with it.
(06-25-2018 03:30 PM)3298 Wrote: [ -> ]Could a native speaker please enlighten me?