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
Problem 1. Explain Break and continue statements in C++. Explanation of Break statement Explanation of Continue statement 2. Explain concepts of constructors and



WAP TO PRINT SUM=1!+2!+3!+4!+....N! #include stdio.h> #include conio.h>   void main() {                    int n,i;                    float sum=0,fac

What's the order that objects in an array are destructed? Need assistance please explain it with example.

write a program in c car booking system

Friend classes are used when two or more classes are designed to work together and require access to each other's execution in ways that the rest of the world shouldn't be permitte

Ask question #M i want to undersatnd about tree structures like node leaf etcinimum 100 words accepted#

Define the Bitwise Operators in c language? C has distinction of supporting special operators that known as bit wise operators for manipulation of data at bit level. These oper

#questiowrite a program to calculate e^x