C++ problem

This is a discussion on C++ problem within the C++ Programming forums, part of the General Programming Boards category; Task-1 a) Write a program to produce a content page for a book using data supplied in fixed format.The data ...

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    2

    C++ problem

    Task-1
    a) Write a program to produce a content page for a book using data supplied in fixed format.The data should be read off a file and the output sent to a printer.
    Consider the following input:
    (First steps (The computers, 5)(Problem Solving (definition, 10) (Outline, 15) (algorithms, 20) (Programs & Procedures, 25)) (Types & Looping (Types (Integer, 30) (Character, 36)
    (Boolean, 43) (Looping (Counting loops, 49) (Conditional Loops, 52)))
    The parentheses indicate the chapters, section & subsections & the numbers foollowing them are the page numbers, Page numberws
    are given when there is no further subsection. The output for the data above would be:

    Contents
    1. First Steps
    1.1 The Computer 5
    1.2 Problem Solving
    1.2.1 Definition 10
    1.2.2 Outline 15
    1.2.3 Algorithms 20
    1.3Programs & Procedures 25
    2. Type & Looping
    2.1 Types
    2.1.1 Integer 30
    2.1.2 Character 36
    2.1.3 Boolean 43
    2.2 Looping
    2.2.1 Counting Loops 49
    2.2.2 Conditional Loops 52

    b) The two text file names File1 & File2 each hold a number of English sentences.
    Write a C++ program to carry out the following operations:
    1.Given a word, it lists how many times that word appears in File1 & File2.
    2.List all the words that occur in both the File1 & File2.
    3.List all the words that occur in File1 but not in File2.
    4.List all the words from both the files that alphabetically come after the word "nice".
    5.To print a list where the words appear in alphabetical order.

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    2
    Plz answer as possible as quickly csz this is very important for me.So..........plz help!!!!!!!!!

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

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