Warning Nu esti autentificat. Te rog autentifica-te sau inregistreaza-te pentru a avea acces la toate facilitatile forumului.
SkullBox  
Decembrie 01, 2008, 09:49:16 pm
Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
Noutăţi: Gadgetinho - IT cu zambetul pe buze
 
 SkullBoxDirector webTutoriale  Pagina principală   Ajutor Caută Autentificare Creează un cont  
Pagini: [1]
  Imprimă  
Subiect: Calculator cu mai multe functii  (Citit de 938 ori)
0Utilizatori şi 1 Vizitatori
Teal
*
Deconectat Deconectat

Mesaje: 601



WWW
Calculator cu mai multe functii, Iunie 27, 2007, 03:25:45 pm

Am vazut ca toata lumea e AutoIT crazy. Mar rog, nu toata lumea. Asa ca am zis sa incerc si eu. Mi-am testat puterea de intelegere, si am vazut cat de simplu este. Am zis sa fac un calculator ca vazusem nu stiu ce user aici pe forum cu un calculator care facea adunarea si scaderea a 2 numere ce avea un design urat, si am zis sa va delectez cu ceva frumos. Am invatat ceva zilele astea facand acest program.

Ce poate el sa faca Thinking
· Adunarea
· Scadere
· Inmultirea
· Impartirea
· Suporta exponenti (2 si 3 predefiniti)
· Face radical de orice ordin(2 si 3 predefiniti). Nu stiu cat de exact
· Logaritmeaza in orice baza(e si 10 sunt prefefinite)
· Functiile trigonometrice
· sinus
· cosinus
· tangent
· cotangent

 si inversele

· arcsinus
· arccosinus
· arctangent
· arccotangent · Calculeza 1/X
· Calculeaza factorialul unui numar pana in 20 inclusiv.

Pe langa aceste operatii, mai are predefinite valorile PI E SI PHI.
Suporta numere cat se poate de reale

Il puteti lua de AICI

Cine are numarul PHI cu 21 de zecimale?
Memorat


"Not only the wisdom of centuries — also their madness breaketh
out in us. Dangerous is it to be an heir."

Nietzsche
tercot
Administrator
*
Deconectat Deconectat

Gen: Bărbat
Mesaje: 1014


Calculator cu mai multe functii, Iunie 27, 2007, 03:36:02 pm

eu am numarul PI cu primele 50.000 de zecimale....
Memorat

Crezi in Dumnezeu si nu vei fi dezamagit.
Teal
*
Deconectat Deconectat

Mesaje: 601



WWW
Calculator cu mai multe functii, Iunie 27, 2007, 03:38:03 pm

Si eu pot sa iti fac o functie care iti calculeaza mai multe zecimale. Dar ma interezeaza PHI deoarece pe E si pe PI ii am cu 21 de zecimale Smile

Valoarea pe care o am e de pe google Laughing
Memorat


"Not only the wisdom of centuries — also their madness breaketh
out in us. Dangerous is it to be an heir."

Nietzsche
DarkByte
Administrator
*
Deconectat Deconectat

Mesaje: 2249



WWW
Calculator cu mai multe functii, Iunie 27, 2007, 03:57:05 pm

Apropos de google ... mi-a gasit si phi cu 2000 de zecimale Smile Te descurci tu de aici Winking

Aici e e cu 2 milioane de zecimale si ti-am calculat si primele 2048 de zecimale ale lui pi.

Bafta

P.S. sa pui sursa, cu sau fara buguri, cu sau fara GPL Tongue
Memorat

Teal
*
Deconectat Deconectat

Mesaje: 601



WWW
Calculator cu mai multe functii, Iunie 27, 2007, 04:32:03 pm

Sa va fie de bine.  :thleft:  :thleft: .

Cod:

#include

GUICreate("Calculator", 300, 255)
$nr=0
$NUMAR_SRC = GUICtrlCreateInput("0", 0, 0, 500, 20,$ES_READONLY)
$do='none'
$op_did=false
$punctx=0

$ABOUT=GUICtrlCreateButton("ABOUT", 225, 225, 70)



$0=GUICtrlCreateButton("&0", 30, 100, 25)
$1=GUICtrlCreateButton("&1", 5, 75, 25)
$2=GUICtrlCreateButton("&2", 30, 75, 25)
$3=GUICtrlCreateButton("&3", 55, 75, 25)
$4=GUICtrlCreateButton("&4", 5, 50, 25)
$5=GUICtrlCreateButton("&5", 30, 50, 25)
$6=GUICtrlCreateButton("&6", 55, 50, 25)
$7=GUICtrlCreateButton("&7", 5, 25, 25)
$8=GUICtrlCreateButton("&8", 30, 25, 25)
$9=GUICtrlCreateButton("&9", 55, 25, 25)


$ORI=GUICtrlCreateButton("&*", 105, 25, 25)
$IMPARTIT=GUICtrlCreateButton("&/", 105, 50, 25)
$PLUS=GUICtrlCreateButton("&+", 105, 75, 25)
$MINUS=GUICtrlCreateButton("&-", 105, 100, 25)
$EGAL=GUICtrlCreateButton("&=", 105, 125, 25)
$PUNCT=GUICtrlCreateButton("&.", 105, 150, 25)
$PLMIN=GUICtrlCreateButton("+ -", 80, 150, 25)

$PI=GUICtrlCreateButton("pi", 55, 150, 25)
$FI=GUICtrlCreateButton("fi", 30, 150, 25)
$E=GUICtrlCreateButton("e", 5, 150, 25)

$SIN=GUICtrlCreateButton("sin", 190, 25, 30)
$COS=GUICtrlCreateButton("cos", 190, 50, 30)
$TAN=GUICtrlCreateButton("tan", 190, 75, 30)
$CTAN=GUICtrlCreateButton("ctan",  190, 100, 30)
$ASIN=GUICtrlCreateButton("arcsin", 140, 25, 50)
$ACOS=GUICtrlCreateButton("arccos", 140, 50, 50)
$ATAN=GUICtrlCreateButton("arctan", 140, 75, 50)
$ACTAN=GUICtrlCreateButton("arcctan",  140, 100, 50)

$X2=GUICtrlCreateButton("x^2", 230, 25, 30)
$X3=GUICtrlCreateButton("x^3", 230, 50, 30)
$XY=GUICtrlCreateButton("x^y", 230, 75, 30)
$XF=GUICtrlCreateButton("x!",  230, 100, 30)
$1X=GUICtrlCreateButton("1/x", 230, 125, 30)

$SQRT2=GUICtrlCreateButton("sqrt 2", 260, 25, 35)
$SQRT3=GUICtrlCreateButton("sqrt 3", 260, 50, 35)
$SQRTY=GUICtrlCreateButton("sqrt y", 260, 75, 35)
$LN=GUICtrlCreateButton("ln", 260, 100, 35)
$LG=GUICtrlCreateButton("lg", 260, 125, 35)
$LO=GUICtrlCreateButton("log y", 260, 150, 35)

$CC=GUICtrlCreateButton("C", 5, 225, 25)
$CE=GUICtrlCreateButton("CE", 30, 225, 25)

$EXIT=GUICtrlCreateButton("EXIT", 155, 225, 70)

GUISetState(@SW_SHOW)

While 1
  $msg = GUIGetMsg()

  Select
  Case $msg = $0
     add('0')
  Case $msg = $1
     add('1')
  Case $msg = $2
     add('2')
  Case $msg = $3
     add('3')
  Case $msg = $4
     add('4')
  Case $msg = $5
     add('5')
  Case $msg = $6
     add('6')
  Case $msg = $7
     add('7')
  Case $msg = $8
     add('8')
  Case $msg = $9
     add('9')
  Case $msg = $PUNCT
 if $punctx=0 AND $op_did=false Then
GUICtrlSetData($NUMAR_SRC,GUICtrlRead($NUMAR_SRC) & '.')
$punctx=1
 EndIf
  Case $msg = $PLUS
 rezolve()
 $do='plus'
  Case $msg = $MINUS
 rezolve()
 $do='minus'
  Case $msg = $ORI
 rezolve()
 $do='ori'
  Case $msg = $IMPARTIT
 rezolve()
 $do='impartit'
  Case $msg = $X2
 rezolve()
 $do='x^2'
 rezolve()
  Case $msg = $X3
 rezolve()
 $do='x^3'
 rezolve()
  Case $msg = $XY
 rezolve()
 $do='x^y'
  Case $msg = $XF
 rezolve()
 $do='xf'
 rezolve()
  Case $msg = $1X
 rezolve()
 $do='1x'
 rezolve()
  Case $msg = $SQRT2
 rezolve()
 $do='sqrt2'
 rezolve()
  Case $msg = $SQRT3
 rezolve()
 $do='sqrt3'
 rezolve()
  Case $msg = $SQRTY
 rezolve()
 $do='sqrty'
  Case $msg = $LN
 rezolve()
 $do='ln'
 rezolve()
  Case $msg = $SIN
 rezolve()
 $do='sin'
 rezolve()
  Case $msg = $COS
 rezolve()
 $do='cos'
 rezolve()
  Case $msg = $TAN
 rezolve()
 $do='tan'
 rezolve()
  Case $msg = $CTAN
 rezolve()
 $do='ctan'
 rezolve()
  Case $msg = $ASIN
 rezolve()
 $do='asin'
 rezolve()
  Case $msg = $ACOS
 rezolve()
 $do='acos'
 rezolve()
  Case $msg = $ATAN
 rezolve()
 $do='atan'
 rezolve()
  Case $msg = $ACTAN
 rezolve()
 $do='actan'
 rezolve()
  Case $msg = $LG
 rezolve()
 $do='lg'
 rezolve()
  Case $msg = $LO
 rezolve()
 $do='lo'
  Case $msg = $PLMIN
 GUICtrlSetData($NUMAR_SRC,GUICtrlRead($NUMAR_SRC)*(-1))
  CASE $msg = $PI
 GUICtrlSetData($NUMAR_SRC,3.14159265358979323846)
 $op_did=true
  CASE $msg = $FI
 GUICtrlSetData($NUMAR_SRC,1.61803988749894848204)
 $op_did=true
  CASE $msg = $E
 GUICtrlSetData($NUMAR_SRC,2.71828182845904523536)
 $op_did=true
  Case $msg = $CE
 GUICtrlSetData($NUMAR_SRC,'0')
 $punctx=0
  Case $msg = $CC
 GUICtrlSetData($NUMAR_SRC,'0')
 $do='none'
 $op_did=false
 $punctx=0
  Case $msg = $EGAL
 rezolve()
  Case $msg = $ABOUT
MsgBox(0,"ABOUT BOX","MADE BY TE4L : te4l@hotmail.com")
  Case $msg = $EXIT
      ExitLoop
  Case $msg = $GUI_EVENT_CLOSE
      ExitLoop
  EndSelect
  if GUICtrlRead($NUMAR_SRC) ='1.#INF' OR GUICtrlRead($NUMAR_SRC) ='-1.#INF' Then
    GUICtrlSetData($NUMAR_SRC, 'ERROR #2: INFINITY')
  EndIf
  GUICtrlSetData($NUMAR_SRC, GUICtrlRead($NUMAR_SRC)+0)
WEnd
 

func rezolve()
global $nr,$do
$pi = 3.14159265358979

Select
Case $do='none'
$nr=GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='plus'
$nr=$nr+GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='minus'
$nr=$nr-GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='ori'
$nr=$nr*GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='impartit'
$nr=$nr/GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='x^2'
$nr=GUICtrlRead($NUMAR_SRC)*GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='x^3'
$nr=GUICtrlRead($NUMAR_SRC)*GUICtrlRead($NUMAR_SRC)*GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='x^y'
$nr=$nr^GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='xf'
$nr=fact(GUICtrlRead($NUMAR_SRC))
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='1x'
$nr=1/GUICtrlRead($NUMAR_SRC)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='sqrt2'
$nr=GUICtrlRead($NUMAR_SRC)^(1/2)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='sqrt3'
$nr=GUICtrlRead($NUMAR_SRC)^(1/3)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='sqrty'
$nr=$nr^(1/GUICtrlRead($NUMAR_SRC))
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='ln'
$nr=LogX(GUICtrlRead($NUMAR_SRC),2.71828182845904523536)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='lg'
$nr=LogX(GUICtrlRead($NUMAR_SRC),10)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='lo'
$nr=LogX($nr,GUICtrlRead($NUMAR_SRC))
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='sin'
GUICtrlSetData($NUMAR_SRC,_sin(GUICtrlRead($NUMAR_SRC)))
Case $do='cos'
GUICtrlSetData($NUMAR_SRC,(1-_sin(GUICtrlRead($NUMAR_SRC))^2)^(1/2))
Case $do='tan'
GUICtrlSetData($NUMAR_SRC,_sin(GUICtrlRead($NUMAR_SRC))/_cos(GUICtrlRead($NUMAR_SRC)))
Case $do='ctan'
GUICtrlSetData($NUMAR_SRC,_cos(GUICtrlRead($NUMAR_SRC))/_sin(GUICtrlRead($NUMAR_SRC)))
Case $do='asin'
$nr=asin(GUICtrlRead($NUMAR_SRC)) * (180 / $pi)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='acos'
$nr=acos(GUICtrlRead($NUMAR_SRC)) * (180 / $pi)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='atan'
$nr=atan(GUICtrlRead($NUMAR_SRC)) * (180 / $pi)
GUICtrlSetData($NUMAR_SRC,$nr)
Case $do='actan'
$nr=atan((1/GUICtrlRead($NUMAR_SRC))) * (180 / $pi)
GUICtrlSetData($NUMAR_SRC,$nr)
EndSelect
$punctx=0
$do='none'
$op_did=true
EndFunc

func add($what)
 global $op_did,$NUMAR_SRC
 if $op_did=true Then
 $buf='0'  
     $op_did=false
 else
     $buf=GUICtrlRead($NUMAR_SRC)
 endif
 If $buf <> '0' Then
 if StringLen(GUICtrlRead($NUMAR_SRC)) < 21 Then
 GUICtrlSetData($NUMAR_SRC,$buf & $what)
endif
 Else
GUICtrlSetData($NUMAR_SRC, $what)
 EndIf
EndFunc

func fact($nr)
  if $nr>20 Then
    return 'ERROR #1: The imput number is to big to calculate'
  EndIf
  $s=1
  for $i=1 to $nr
 $s=$s*$i
  next
  return $s
EndFunc

func LogX($x,$y)
    Return Log($x) / Log($y)
EndFunc

func _sin($what)
  $pi = 3.14159265358979  
  $degToRad = $pi / 180
  $__sin=1
  if $what>360 Then
 $what=mod($what , 360)
  EndIf
  if $what>=0 and $what<=180 Then
 $__sin=1
  EndIf
  if $what>180 and $what<360 Then
 $__sin=-1
  EndIf
  if $what>90  Then
 $what=abs($what-360)
endif
  return Sin($what * $degToRad)*$__sin
EndFunc

func _cos($what)
  $pi = 3.14159265358979  
  $degToRad = $pi / 180
  $__sin=1
  If $what>360 Then
 $what=mod($what , 360)
  EndIf
  if $what>=0 and $what<=180 Then
 $__sin=1
  EndIf
  If $what>180 and $what<360 Then
 $__sin=-1
  EndIf
  If $what>90  Then
 $what=abs($what-360)
endif
  return Cos($what * $degToRad)*$__sin
EndFunc

Memorat


"Not only the wisdom of centuries — also their madness breaketh
out in us. Dangerous is it to be an heir."

Nietzsche
Teal
*
Deconectat Deconectat

Mesaje: 601



WWW
Calculator cu mai multe functii, Iunie 27, 2007, 07:43:49 pm

aveam un mic bug. iar smlex ma ajutat sa il corectez(el o scris totu).  tare complicat autoit asta.

o sa fac upload la ce e nou si o sa pun link.
Memorat


"Not only the wisdom of centuries — also their madness breaketh
out in us. Dangerous is it to be an heir."

Nietzsche
Meteora
*
Deconectat Deconectat

Mesaje: 81



WWW
Calculator cu mai multe functii, Iunie 21, 2008, 06:12:49 pm

vezi ca are niste greseli bugul...n-am stat sa le corectez..ceva la guicrltcreateinput..cand il compilez imi apare eroare..dar nu-i nimic
Memorat
AnaKonD
Global Moderator
*
Deconectat Deconectat

Gen: Bărbat
Mesaje: 417


Calculator cu mai multe functii, Iunie 21, 2008, 07:10:14 pm

^OFF-TOPIC:  Meteora arunca un ochi aici (sper ca te descurci cu engleza).
Memorat

"Să nu te opreşti niciodată din a-ţi pune întrebări, curiozitatea stă la baza existenţei."(Albert Einstein)
cross the line
SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Creat cu MySQL Creat cu PHP Ethical hacking and programming community Director web romanesc cu inscriere gratuita Validat cu XHTML 1.0! Validat cu CSS!
IPFind, FAQDB, LAMP.ro, Good Proxy, Aberez.EU, RoFreeSBIE, ShockingSoft.com, HostVision, Invatam.net, PC Troubleshooting, Curs valutar online
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro