Quiz+4+Programs

Program 1
for x:1..10 by 2 put x: 2.. exit when x=6 end for

Program 2
get num if **//... incomplete part...//** then put "Even" end if

Program 3
for x: 10 .. 30 by z end for

Program 4
put "Greetings": 10, "Donovan": 3

Program 5
for times: 8..8 put times end for

Program 6
%This program asks the user for their name and age %It then tells the user their age in the year 2020 %Note: the final output is all on one line

var name: _ _ _ _ _ _ (1) var age, newage, currentyear: _ _ _ _ _ _ (2) put "Enter your name:" _ _ _ _ _ _ name (3) put _ _ _ _ _ _, "Enter your age:" (4) _ _ _ _ _ _ age (5) put name, "Enter the current year:" get _ _ _ _ _ _ _ _ (6) newage := age + (2020 - _ _ _ _ _ _) (7) put name, "you will be ", _ _ _ _ _ _ _ _ _, "in the year 2020. " (8)

Program 7
var number :real := 150 number:= number div 2 put number div 2 number := number / 5 put number /5