Tuesday, November 2, 2010

Tuesday- Finished Repetition Assignments

  I have finished all my repetition assignments, however I had trouble with number 8. If any one is have trouble with assignment 6, 1 or 5 here are there codes :


#1 :  
for counter : 1 .. 13 
put counter 
end for 


#5 :
const sentinel_value := "no"
var word : string 
var total_words:int:=0
var answer :string 


loop 
put "Word? "
get word 
total_words:= total_words+1
put "You have stated: ", total_words, " words."
put "Continue? (yes/no)"
get answer 
exit when answer = sentinel_value
end loop 


#6 :
var total_mark : int := 0
var mark : int
var number_of_marks : int := 0 
var mean : real
var answer : string 
loop 
put "Mark: " 
get mark
total_mark:= mark+total_mark
number_of_marks := number_of_marks+1
put "You have ", number_of_marks, " stated."
put "More marks (yes/no)? "
get answer
exit when answer = "no" or answer =  "NO" or answer =  "No"
end loop 

mean := total_mark/number_of_marks

put "The mean of your marks is: ", mean : 0 : 2

  I choose to show these codes because these are the foundations for codes to come in Repetition. Tomorrow is take your kids to work day and I am looking forward to that. I hope that my father will keep me occupied for most of the day, otherwise I will have nothing to do. I believe that I will be taught many fantastic methods for creating the infrastructural of a well established business. I believe the course that I want to take in university is economy or business, because the world runs on these two subjects. 

No comments:

Post a Comment