Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 10 REM RESOLVE EQUACAO DO SEGUNDO GRAU
  2. 20 READ A,B,C
  3. 25 IF A=0 THEN GOTO 410
  4. 30 LET D=B*B-4*A*C
  5. 40 IF D<0 THEN GOTO 430
  6. 50 PRINT "SOLUCAO"
  7. 60 IF D=0 THEN GOTO 100
  8. 70 PRINT "PRIMEIRA SOLUCAO",(-B+SQR(D))/(2*A)
  9. 80 PRINT "SEGUNDA SOLUCAO",(-B-SQR(D))/(2*A)
  10. 90 GOTO 20
  11. 100 PRINT "SOLUCAO UNICA",(-B)/(2*A)
  12. 200 GOTO 20
  13. 410 PRINT "A DEVE SER DIFERENTE DE ZERO"
  14. 420 GOTO 20
  15. 430 PRINT "NAO HA SOLUCOES REAIS"
  16. 440 GOTO 20
  17. 490 DATA 10,20,1241,123,22,-1
  18. 500 END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement