• # calcul

    Posté par . En réponse au message Logiciel de prise de notes "interactives". Évalué à 0.

    Salut,

    Ce que tu décris, c'est un logiciel de calcul, pas un logiciel de prise de notes…

    $ bc -l
    bc 1.06.95
    Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
    This is free software with ABSOLUTELY NO WARRANTY.
    For details type `warranty'. 
    adsl=30
    gsm=20
    12*(adsl+gsm)
    600
    
    

    Et tu peux faire ça avec n'importe quoi…

    en bash par exemple :

    $ adsl=30
    $ gsm=20
    $ expr 12 \* \( $adsl + $gsm \)
    
    

    ou en Python :

    $ python
    Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
    [GCC 4.7.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> adsl=30
    >>> gsm=20
    >>> 12*(adsl+gsm)
    600
    
    

    Et en utilisant un langage de programmation, tu peux aussi faire quelque chose de dynamique :

    $ python
    Python 2.7.4 (default, Apr 19 2013, 18:28:01) 
    [GCC 4.7.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> comann = lambda adsl, gsm: 12*(adsl+gsm)
    >>> comann(30, 20)
    600