Machine Problem

This is a discussion on Machine Problem within the C++ Programming forums, part of the General Programming Boards category; Can you please help me with this? 1. Write a program that will read a float and a character for ...

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    1

    Machine Problem

    Can you please help me with this?


    1. Write a program that will read a float and a character for each scanf(). The character could be d for deposit or w for withdrawal. Starting with a balance of zero, add the deposits and subtract the withdrawals until the balance becomes negative. Then print by how much the balance went negative.
    The sample input and output are given below.
    -----------------Output---------------
    100.0 d
    20.0 d
    60.0 w
    200.0 w
    Your account now is -140.00 dollars.

    Requirement:
    a.) Pseudocode
    b.) Source Code
    c) Output window
    Last edited by Danuel Mae; 02-24-2012 at 07:01 AM. Reason: assignment :(

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    You are not asking for help, you're asking us to do your work for you. Read our homework policy. We answer specific questions only.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Change Machine Problem
    By dmarsden1 in forum C Programming
    Replies: 2
    Last Post: 02-13-2012, 08:14 AM
  2. Replies: 4
    Last Post: 01-18-2008, 07:05 PM
  3. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 08:02 PM
  4. problem with connecting to my own machine
    By EvBladeRunnervE in forum Networking/Device Communication
    Replies: 10
    Last Post: 07-24-2003, 05:16 PM
  5. IDEA: A Slot Machine (aka a fruit machine)
    By ygfperson in forum Contests Board
    Replies: 0
    Last Post: 08-13-2002, 12:13 AM

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