A number is called a happy number, if you start with the given number
and arrive at 1 by repeating the following process (as illustrated in the below example): (a)
compute the sum of the squares of given number digits (b) if the resultant value is 1, then
the number is happy number, else execute point (a) for the newly produced number.
Note that if a number is not a happy number, there will be an endless loop to this execution.
Goal: In this question, you are required to write C++ code that checks whether the number entered by the user is a happy number or not for 10 cycles/iterations only.
Example: Assume a number 19
Number Computation Result cycle/iterations
19 1^2 + 9^2 82 1
82 8^2 + 2^2 68 2
68 6^2 + 8^2 100 3
100 1^2 + 0^2 +0^2 1 4
Understanding customer needs is essential in product-focused industries. Being able to predict customer demand will result in fulfilling orders with short lead times on time. This will also have the effect of increasing trust between customer and supplier. With this regard,
2.2 Discuss how seasonality can affect a long-term forecast?
Understanding customer needs is essential in product-focused industries. Being able to predict customer demand will result in fulfilling orders with short lead times on time. This will also have the effect of increasing trust between customer and supplier. With this regard,
2.1 Describe the importance of demand forecasting for effective logistics
management?
Which philosophy of education argues that education should not be based on rational knowledge and the measuring performance by means of examinations, tests and assignments
a.
postmodernism
b.
hermeneutics
c.
scientific rationalism
d.
feminism
Discuss the financial impact of logistics in today’s businesses?
Explain the role and influence of globalisation to the logistics function?
Write a program to find the table of numbers using a while loop. Your program should ask the size of the table. That size defines the rows and columns. Sample output:
IT must be done using WHILE loop.
Enter size: 6
1 2 3 4 5 6
------------------------------------------
1* 1 2 3 4 5 6
2* 2 4 6 8 10 12
3* 3 6 9 12 15 18
4* 4 8 12 16 20 24
5* 5 10 15 20 25 30
6* 6 12 18 24 30 36
What is delta S, the change in entropy of ten moles of an ideal monatomic gas that is expanded slowly and isothermally at a temperature of 293K from a pressure of 2 atm to a pressure of 1 atm?
a) 57.6 J/K
b) 203.4 J/K
c) 21.7 J/K
A function is defined on R such that f(x) = (C^2)x when x≤1 and 5Cx-6 when x>1 . Determine the values of C so that f becomes continues on R