Thread: Need C++ code

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    Need C++ code

    Problem Statement: File Handling in C/C++
    On the basis of the given scenario create a file Expenses.txt, Open the file and copy into another Expenses2.txt, Also show output on screen
    A college has announced the total budget of 50,000Rs.for each game. Games are done four times in a year. Take expenses as an input from user.
    Calculate the average expenses for a game:





    1. If the expenses greater than 80% show as” Very Expensive”.
    2. If the expenses are greater than 60% and less than 80% than show “Expensive ”
    3. If the expenses are greater than 50% and less than 60% than show “Less Expensive ”
    4. If the expenses are greater than 40% and less than 50% than show “Not Costly”.
    5. If the expenses are less than 40% than show “Best”.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Sounds doable. Go ahead and do it

    You might want to read the homework policy if you run into problems and want to ask for help here.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    What do you want that here you just post your assignments then there will be a forum member who will solve for you that soundz great to me

  4. #4
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by laserlight View Post
    Sounds doable. Go ahead and do it
    <-- knows laserlight's high post count secret (10,411)

    Edit: oh, edited
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  5. #5
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472

  6. #6
    Registered User
    Join Date
    Oct 2009
    Posts
    48
    You know the economy is bad when computer scientists are placing bids to do college homework

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    21
    damn and i just join the forum and i though that i was noob.....man the way i see it you only need a table, avg calculation and if,if,if,if ( no offence ofc)

  8. #8
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    You know the economy is bad when computer scientists are placing bids to do college homework
    haha, there was a project offered on there pointed out by abachler, the bid was capped at the princely sum of $100.... hard times indeed!

  9. #9
    Registered User
    Join Date
    Oct 2009
    Location
    While(1)
    Posts
    377
    Quote Originally Posted by rogster001 View Post
    haha, there was a project offered on there pointed out by abachler, the bid was capped at the princely sum of $100.... hard times indeed!
    LOL Ok My bid is only $50 dude half of rogster001

  10. #10
    Registered User
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    147
    Quote Originally Posted by RockyMarrone View Post
    LOL Ok My bid is only $50 dude half of rogster001
    I'll do it for $35!

    In all seriousness, this is very much deserved: How To Ask Questions The Smart Way

  11. #11
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  12. #12
    Registered User
    Join Date
    Apr 2004
    Location
    Ohio
    Posts
    147
    /facepalm

    I don't think I'll ever understand why compsci students insist on posting their homework questions so others can figure it out for them. Why did you bother going to school then?

  13. #13
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by leeor_net View Post
    /facepalm

    I don't think I'll ever understand why compsci students insist on posting their homework questions so others can figure it out for them. Why did you bother going to school then?
    Obviously they're just after the piece of paper.

    I do not approve.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  14. #14
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    Quote Originally Posted by Dae View Post
    Obviously they're just after the piece of paper.

    I do not approve.
    Well at college tuition rates these days, learning from a book is much more cost efficient. The accreditation really is the only reason to go to university.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  15. #15
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Quote Originally Posted by King Mir View Post
    Well at college tuition rates these days, learning from a book is much more cost efficient. The accreditation really is the only reason to go to university.
    Sure, that's if you're actually interested in learning (from a book or school). People interested in their chosen degree wouldn't come to paste their homework here, they'd be here to learn, or help, etc. It's about the paper, and only the paper.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extended ASCII Characters in an RTF Control
    By JustMax in forum C Programming
    Replies: 18
    Last Post: 04-03-2009, 08:20 PM
  2. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  3. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM

Tags for this Thread