Computes the amount of postage count even or odd, C/C++ Programming

(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2.

(b) Write a procedure (postage wt) that computes the amount of postage to be included on a letter given its weight, wt. Use the following rules:
Less than 30 grams, 15 cents
30 to 49 grams, 17 cents
50 to 99 grams, 22 cents
100 and over grams, 1 cent for each 4 grams.

(c) The specification for (b) has a problem of ambiguity. What is it and what does your procedure do regarding the problem?

 

Posted Date: 3/25/2013 1:49:07 AM | Location : United States







Related Discussions:- Computes the amount of postage count even or odd, Assignment Help, Ask Question on Computes the amount of postage count even or odd, Get Answer, Expert's Help, Computes the amount of postage count even or odd Discussions

Write discussion on Computes the amount of postage count even or odd
Your posts are moderated
Related Questions
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Yes. "Memory pools" are useful in many situations. The bad news is that I'll need to drag you through the mire of how it acts before we talk about all the uses. Firstly, recall

#include stdio.h> #include conio.h> #include ctype.h> #include string.h>   void main() {           int i=0,j=0,length;           char a[30];           cl

What if I wish a local to "die" before the close} of the scope wherein it was created? Can I call a destructor on a local if I want to?

Explain the Working of strcpy Function? strcpy() : This function is meant to use to copy one string to another. The strcpy function as well accepts two strings as arguments.

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

assume that the first integer read with cin specifies the number of values remaining to be entered. that program should read only one value each time cin is executed .a typical inp

Op e r a t o r P r e c e d e n c e a n d A s s o c i a t i v e l y : T h e op e r a t o r p r e c e d e n c e a n d i

•Flow Chart and Pseudocode of Add module - Hotel booking - Signup for new membership Delete module - Hotel reservation cancellation - Change of reservation

Explain the Bitwise-Inclusive-OR Operator: |? The bitwise-inclusive-OR operator (|) contrast each bit of its first operand to the corresponding bit of its second operand and if