Re: BASIC-256

Publié par yassine67300 le 08/06/2014 11:57:43
Mon premier petit et rapide test.
tout simple, je crois que je vais repasser des heures sur ce truc, il suffit que je trouve quelque chose d'intéressant à programmer et avec de l'entrainement optimiser le code.

Retour: #
Print "CALCULS"
print
print "donnez votre choix de calcul"
print
print " Addition de 2 nombres, entrez 1"
print " Soustraction, entrez 2"
print " Multiplication, entrez 3"
print " Division , entrez 4"
print
input a
if a<1 then CLS : print "ERREUR, ":goto Retour
if a>4 then CLS : print "ERREUR" :goto Retour
print
print "donnez le premier nombre"
input b
print "donnez le deuxième nombre"
input c
Print: print "RESULTAT"
if a=1 then d=b+c :print d
if a=2 then d=b-c :print d
if a=3 then d=b*c :print d
if a=4 then d=b/c : print d
Print : print
print "Pour un autre calcul entrez 1, sinon entrez 2"
Input e
print
if e=1 then CLS :goto Retour
if e<>1 then CLS

Cette contribution était de : http://www.gratilog.net/xoops/newbb/viewtopic.php?forum=2&topic_id=10754&post_id=156057