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

Assignment Help:

(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?

 


Related Discussions:- Computes the amount of postage count even or odd

C program for function of count the characters in each word, C Program for ...

C Program for FUNCTION OF COUNT THE CHARACTERS IN EACH WORD void count(char c[]); void main() {           char a[50];           int i=0;           clrscr();

Create a client program tracker, This project simulates an application call...

This project simulates an application called tracker for the Department of Transportation (DOT) in which highway traffic data is accumulated in real time using various sensing equi

Define polymorphism?, Define Polymorphism? A: Polymorphism let a client ...

Define Polymorphism? A: Polymorphism let a client to treat di_erent objects in the simialr way even if they were developed from di_erent classes and exhibit di_erent behaviors.

Write a program to add co-ordinates of the plane, Write a program to add co...

Write a program to add co-ordinates of the plane The class having x and y co-ordinates. Create three objects. Use a constructor to pass one pair of co-ordinates and a funct

When i throw this object, A: Depends. Might be "zero" Objects which are ...

A: Depends. Might be "zero" Objects which are thrown must have a publicly accessible copy-constructor. The compiler is permitted to generate code which copies the thrown object

I want application to generate premium, Project Description: We want to ...

Project Description: We want to generate premium numbers for one of our application. What we need is: A program that generate 2, 3, 4, 5, 6, 7, 8 digits premium numbers

Discuss polymorphism in c++, Problem 1. Discuss polymorphism in c++. ...

Problem 1. Discuss polymorphism in c++. Explaining Polymorphism 2. Write a program in c++ to read a 3X2 matrix and find smallest number in that matrix. Writin

What is the difference between = symbol and = = symbol, What is the differe...

What is the difference between = symbol and == symbol? - The = symbol is generally used in mathematical operations. It's used to assign a value to a given variable whereas the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd