Resultado interesante

Resultado interesante

Postby karinha » Fri Mar 27, 2020 9:13 pm

Code: Select all  Expand view

#include "FiveWin.ch"

STATIC oWnd

FUNCTION Main()

   LOCAL oBar

   DEFINE WINDOW oWnd TITLE "Bilhões de dolares"

   DEFINE BUTTONBAR oBar _3D OF oWnd

   DEFINE BUTTON OF oBar ACTION( BILHOES_DOLAR() )

   SET MESSAGE OF oWnd TO "Bilhões de dolares" NOINSET CLOCK DATE KEYBOARD

   ACTIVATE WINDOW oWnd CENTERED

RETURN NIL

FUNCTION BILHOES_DOLAR()

   LOCAL oDlg
   LOCAL oGet1, oGet2, oGet3, oGet4
   LOCAL cVar1, cVar2, cVar3, cVar4
   LOCAL nMilhoes1   := "111.111.111"
   LOCAL nMilhoes2   := "111.111.111"
   LOCAL nMultiplica := 0.00
   LOCAL nResultado  := 0.00

   oGet1 := SPACE(50)
   cVar1 := 0.00

   nMultiplica := VAL( nMilhoes1 ) * VAL( nMilhoes2 )

   nResultado  := nResultado + nMultiplica

   cVar1 := nResultado

   DEFINE DIALOG oDlg TITLE "From Code" PIXEL SIZE 500, 300

   @ 10,10 GET oGet1 VAR cVar1 OF oDlg PIXEL SIZE 150,12    ;
      PICTURE "@K 999999.999999" BITMAP "..\bitmaps\on.bmp" ;
      ACTION( msginfo( "FiveWin Power" ) ) CENTER

   oGet1:lBtnTransparent := .T.

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 


Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Resultado interesante

Postby leandro » Fri Mar 27, 2020 10:32 pm

El resultado

Image

?
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Resultado interesante

Postby Euclides » Sat Mar 28, 2020 9:44 pm

... matando pulgas a cañonazos...
Code: Select all  Expand view
#include "fivewin.ch"

Function Main()
   ? str(11111111^2, 15)      //  123456787654321
   ? str(111111111^2, 18)     //  12345678987654320 <- Limitación de Harbour
/*
   11111111 * 11111111 =   11111111
+                         111111110
+                        1111111100
+                       11111111000
+                      111111110000
+                     1111111100000
+                    11111111000000
+                   111111110000000
=                   123456787654321                  
*/
 
return nil
 

Saludos, Euclides
User avatar
Euclides
 
Posts: 156
Joined: Wed Mar 28, 2007 1:19 pm

Re: Resultado interesante

Postby karinha » Sun Mar 29, 2020 1:53 am

Very good, Muy Bién Euclides!
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests