Documente Academic
Documente Profesional
Documente Cultură
2 - 10 CLS
20 INPUT "What's your name?"; A
30 Let B = "Hello"
40 PRINT B+" "+A
3 - 10 CLS
20 INPUT "What is your name?"; A
30 IF A = "Alice" OR A = "Bob" THEN PRINT "Hello"+" "+A ELSE PRINT "No"
4 - 10 CLS
20 INPUT "Type a Number"; N
30 FOR A=1 TON
40 LET X= A+X
50 NEXT A
60 PRINT X
5 - 10 CLS
15 REM This program adds the sum of 1 and a number the user picks that is a multiple of 3 or
5.
20 INPUT "Type in a number"; N
30 IF N = 3 OR N = 5 OR N =6 OR N = 9 OR N = 10 OR N = 12 OR N = 15 THEN PRINT 1 + N
ELSE PRINT 1 + 0
6 - 10 CLS
15 REM This program asks the user for a number n and gives them the possibility to choose
between computing the sum and computing the product of 1 and n.
20 INPUT "Type in a number"; N
30 INPUT "Compute the sum or compute the product?"; A
40 IF A = "Sum" THEN PRINT 1 + N ELSE GOTO 60
50 END
60 IF A = "Product" THEN PRINT 1 * N ELSE GOTO 10
7- 10
CLS
15 REM
This