SMB4103-Introduction to Programming Page 1 of 1
SMB4103-Introduction to Programming
Semester 2, 2018
Log/Workbook Assessment
Log/Workbook No. : Log/Workbook-2
Due date: Week 5
Group/individual: Weighting: |
Individual Assignment 30% |
Student ID: ____________________, Student Name: ________________________________
Question one (10 marks)
Write a program that displays a multiplication table. The program should ask the user to enter two
numbers (x) and the range (n) up to which the user wants to display the multiplication table. For
example, the multiplication table for x=4 and n=5 as follows:
4 x 1=4
4 x 2=8
4 x 3=12
4 x 4=16
4 x 5=20
Question two (10 marks)
Write a program to ask the student to enter from the keyboard the following information: First
Name, Last Name, and Student ID. The program should store this information at a text file. Your
program should use a loop to enter and store information for four students.
Question three (10 marks)
In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive
integers less than or equal to n. For example,
5!=5 *4* 3* 2* 1 =120
Write a program to print and calculate the factorial for a given (n) number.
The post Write a program that displays appeared first on My Assignment Tutor.
-
- Assignment status: Resolved by our Writing Team
- Source@PrimeWritersBay.com
Comments
Post a Comment