CODINGLISTINGS ★ 3D Characters|Amstrad Action) ★

CirclesCoding Listings
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

John Dyson, who lives in Penistone , has written a program to work out some arithmetic to do with circles - surely you remember those lessons where PI figured prominently?

This program does all the tough work for you - just type in the radius and so forth and then sit back and let your Amstrad do the rest.

1 REM Circles
2 REM By John Dyson
3 REM Amstrad Action September 1988
10 REM MENU
20 PAPER 15:BORDER 22:PEN 2:CLS
30 LOCATE 10,1:PRINT "CIRCLES"
40 LOCATE 10,5:PRINT "1) AREA OF A CIRCLE"
50 LOCATE 10,7:PRINT "2) PERIMETER "
60 LOCATE 10,9:PRINT "3) AREA OF PART OF A CIRCLE"
70 LOCATE 10,11:PRINT "PLEASE TYPE IN A NUMBER"
80 INPUT N::IF N=1 THEN GOTO 120 ELSE 90
90 :IF N=2 THEN GOTO 190 ELSE 100
100 IF N=3 THEN GOTO 260 ELSE 80
110 REM MAIN PROGRAM
120 CLS
130 PRINT "PLEASE INPUT THE RADIUS OF YOUR CIRCLE(IN CENTIMETERS)"
140 INPUT R
150 A=PI*R*R
160 PRINT "THE AREA OF YOUR CIRCLE IS ";A;" CM'S SQUARED"
170 CALL &BB18
180 GOTO 10
190 CLS
200 PRINT "INPUT THE RADIUS OF YOUR CIRCLE"
210 INPUT R
220 P=PI*R*2
230 PRINT "THE PERIMETER OF YOUR CIRCLE IS ";P;" CM'S"
240 CALL &BB18
250 GOTO 10
260 CLS
261 PRINT "PLEASE INPUT, AS A DECIMAL THE FRACTION OF THE CIRCLE YOU WISH TO FIND THE AREA OF"
270 INPUT F
280 PRINT "NOW PLEASE INPUT THE RADIUS OF YOUR CIRCLE"
290 INPUT R
300 A=F*PI*R*R
310 PRINT "YOUR CIRCLE HAS AN AREA OF ";A;" CM'S SQUARED"
311 CALL &BB18
320 GOTO 10

AA#36 (September 88)

★ PUBLISHER: Amstrad Action
★ YEAR: 1988
★ AUTHOR: John Dyson

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Coding Src's » Graphic - Mirror (CPC Attack)
» Coding Src's » Graphic - Planets (Your Computer)
» Coding Src's » Waves (Computing with the Amstrad)
» Coding Src's » Zellautomat (CPC Amstrad International)
» Coding Src's » DIY Fractal Design (Computing with the Amstrad)
» Coding Src's » La marche Turque (CPC Revue)
Je participe au site:

» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 194 millisecondes et consultée 1184 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.