CS代考 1. Many people believe that “7” is a lucky number. Our CC thinks that “777”

1. Many people believe that “7” is a lucky number. Our CC thinks that “777” is even luckier, and he likes to see it frequently. Write an LMC program named “s-C1.lmc” which asks for an input of a number, say n, from users. The program will then output the number “777” for n times.

Submit your source code to OLE for the script marker to test your program.
[10 marks]

Copyright By PowCoder代写 加微信 powcoder

2. Write an LMC program named “s-C2.lmc”, which asks for two integer inputs say a and b from the user. The program then outputs the sum of all integers between these two numbers (inclusively). Please note that there is a possibility of a is greater b or b is greater than a.

Submit your source code to OLE for the script marker to test your program.
[10 marks]

3. Generally speaking, if a year value is a multiple of 4, it is a leap year. Write an LMC program named “s-C3.lmc” which accepts an input year value from the user and then returns 1 if it is a leap year, and 0 if it is not a leap year.

Submit your source code to OLE for the script marker to test your program.

[10 marks]

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com