Lecturer : Saipunidzam Mahamad Date Assigned : Week 08



Download 152.5 Kb.
Date01.03.2021
Size152.5 Kb.
#55952
Lc W08 - LMC Assignment
Lc W08 - LMC Assignment

C ourse Name : Computer System


Course Code : TEB1024

Lecturer : Saipunidzam Mahamad

Date Assigned : Week 08

Due Date : Week 09


________________________________________________________________________

Exercise

In a group of two choose ONE (1) question in Part A and ONE (1) question in Part B.

Part A



  1. Write a Little Man program that accepts three values as input and produces the largest of the three as output. (CS)

  2. Write a Little Man program that accepts three values as input and outputs them in order of size, largest to smallest (IT)

Part B



  1. Write a Little Man program that prints out the odd numbers from 1 to 99. No input is required.

  2. Write a Little Man program that prints out the sums of the odd values from 1 to 39. The output will consist of 1, 1+3, 1+3+5, 1+3+5+7 … No input required. As an aside, do you notice anything interesting about the output results that are produced by this series? This series is sometimes used as a part of an algorithm for finding square roots of numbers.



____________________________________________________________________________________________________________


Download 152.5 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page