Algorithm to C++ Conversion Help, PLEASE!!!!!

This is a discussion on Algorithm to C++ Conversion Help, PLEASE!!!!! within the C++ Programming forums, part of the General Programming Boards category; I need help generating C++ code from the fallowing algorithm. Thank you. PayCalc 1. CaseOf PayCode = "H" Pay = ...

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    2

    Algorithm to C++ Conversion Help, PLEASE!!!!!

    I need help generating C++ code from the fallowing algorithm. Thank you.

    PayCalc

    1. CaseOf
    PayCode = "H"
    Pay = Rate * Hours
    PayCode = "P"
    Pay = Rate * NoPieces
    PayCode = "C"
    Pay = Commission * Sales
    PayCode = "S"
    Pay = Salary
    EndOfCase

    2. Exit

  2. #2
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    Sure: C++ Tutorials. You may find of particular interest Lesson 5: Switch Case.
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,847
    Yeah, we have a 2-step algorithm here as well.

    step 1

    Step 2

    Show some effort, to show us what you may/may not understand, then we can talk.

    What isn't going to happen is you getting a complete answer on a plate with no more effort on your part.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Aug 2011
    Posts
    2
    oh hush im looking for resources like that video that guy sent me too as well, im working on it, im new

  5. #5
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,528
    Quote Originally Posted by cstudento View Post
    oh hush im looking for resources like that video that guy sent me too as well, im working on it, im new
    It shows how much you're 'working' on it ! ...Not even a click...

    std::Video + Code = T***L
    Last edited by manasij7479; 08-21-2011 at 04:32 PM.
    Manasij Mukherjee | gcc-4.9.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C# to C++ conversion?
    By hammari in forum C# Programming
    Replies: 8
    Last Post: 03-18-2011, 01:51 AM
  2. conversion
    By ashok449 in forum C Programming
    Replies: 2
    Last Post: 03-04-2008, 03:35 AM
  3. Replies: 5
    Last Post: 04-12-2006, 07:30 PM
  4. Conversion!!!
    By GT70sgt in forum C++ Programming
    Replies: 1
    Last Post: 11-19-2003, 07:51 PM
  5. my grandfather's chess algorithm can beat your grandfather's chess algorithm...
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 08-17-2001, 07:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21