Functional Programming Answers

Questions: 109

Answers by our Experts: 81

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Give the meaning of the following declarations; (3 marks)

(i) char name[20];

(ii) int num_emp;

(iii) double tax, basicpay;

(iv) char response;


Write a program that computes the number of seconds in a year. The mass of a single molecule of water is about 3.0 x 10-23 grams. A quart of water is about 950 grams. Write a program that requests an amount of water in quarts and displays the number of water molecules in that amount.


  1. A retail shop offers discounts to its customers according to the following rules:

Purchase Amount  >= Ksh. 10,000 - Give 10% discount on the amount.

Ksh. 5, 000 <= Purchase Amount < Ksh. 10,000 - Give 5% discount on the amount.

Ksh. 3, 000 <= Purchase Amount < Ksh. 5,000 - Give 3% discount on the amount. 

0 > Purchase Amount  < Ksh. 3,000 - Pay full amount.

Write a program that asks for the customer’s purchase amount, then uses if statements to recommend the appropriate payable amount. The program should cater for negative purchase amounts and display the payable amount in each case.


how to type string Johor


In transportation problem, consider the following scenario: When the total units from the sources are less than total demand units, which operation is performed to make the given matrix as balance matrix?


Work as a team of three to complete the following steps :


1. Assign each of the following storage media to a team member DVDs, USB flash drives and external hard drives.


2. Use the Internet and other resource to research the cost to store 1 GB of data to the following media:


4.7 GB DVD-R

25 GB Blu-ray disc

8 GB USB flash Drive

16 GB USB Flash Drive

500 GB portable external hard drive

1 TB desktop external hard drive


write a program to initialize the data members through passing two parameters using a constructor.

calculate their sum and print the output on the screen using a sparate member function of a class.


Start with the String class from the NEWSTR example in this chapter. Add a member function called upit() that converts the string to all uppercase. You can use the toupper() library function, which takes a single character as an argument and returns a character that has been converted (if necessary) to uppercase. This function uses the CCTYPE header file. Write some code in main() to test upit().



What is Responsive Design and why is mobile web an important element of web design?


Interface a stepper motor with microcontroller 7.5 8051 & write a C-program to rotate the motor continuously in counter clockwise direction. If the step angle of stepper motor is 2", then how many steps required to cover an angle of 270" by the stepper motor.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS