[Solved] ITDSIU19023 Lab 2

$25

File Name: ITDSIU19023_Lab_2.zip
File Size: 160.14 KB

SKU: [Solved] ITDSIU19023 Lab 2 Category: Tag:
5/5 - (1 vote)
  1. Write a Taxi meter program to calculate the taxi fare for a given mileage.
    1. The first 2km is 15,000 VND
    2. The next 250m will cost 2000 VND
    3. If the travel distance is larger than 30km then each extra km will cost only 5000VND

Allow user to input the travel distance in km and print the amount of money to be paid.

  1. Write a function to calculate the factorial with given integer n, which satisfies the following:

if n is odd, factorial = 1 * 3 * 5 * * n

if n is even, factorial = 2 * 4 * 6 * *n

  1. Write a function to represent a given integer as product of prime numbers

Example: 24 = 2*2*2*3

  1. Input an array of n integers, n is even. Sort the first half in increasing order and second half decreasing order

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ITDSIU19023 Lab 2[Solved] ITDSIU19023 Lab 2
$25