Thread: i cant analyze this simple problem

  1. #1
    Registered User
    Join Date
    Jul 2016
    Posts
    6

    i cant analyze this simple problem

    Snail Mail Company : charges php 28.99 per telegram that does not exceed 12 words and php2.50 pesos for every succeeding word plus php5.00 service charge if type of delivery is special. Input Customers name and the number of words in a telegram and the type of delivery ('S' or 's' for special). The Program should output the computed telegram cost.


    i dont understand how to code the 'Does Not Exceed 12 words and php2.50 pesos for every suceeding word'.

    can some1 analayze this pls.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You first need to work out on paper what say
    5 words cost
    10 words cost
    15 words cost

    Understanding the problem is a pencil and paper exercise.

    When you understand the problem, then you can think about writing code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Analyze of backtrace from gdb, really hard!
    By Pavlus in forum C++ Programming
    Replies: 0
    Last Post: 11-08-2009, 12:28 PM
  2. A Full Program to analyze.
    By sergioms in forum C Programming
    Replies: 2
    Last Post: 12-30-2008, 09:42 AM
  3. analyze the answer for the code
    By 2001beibei in forum C Programming
    Replies: 6
    Last Post: 06-03-2008, 02:06 AM
  4. (psycho)analyze this!
    By Darkness in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-10-2005, 09:25 PM
  5. Please Help me Analyze Wave ..
    By toa2k in forum C++ Programming
    Replies: 3
    Last Post: 01-19-2004, 03:20 PM

Tags for this Thread