Sponsored Links


Results 1 to 2 of 2

Thread: asign _1.data,struct

  1. #1
    alibaig
    Guest

    Icon19 asign _1.data,struct

    Sponsored Links1


    Assignment No. 01
    SEMESTER Spring 2011
    CS301- Data Structures
    Total Marks: 20

    Due Date: 19/04/2011
    Instructions
    Please read the following instructions carefully before solving & submitting assignment:
    It should be clear that your assignment will not get any credit (zero marks) if:
    o The assignment is submitted after due date.
    o The submitted code does NOT compile.
    o The submitted assignment does NOT open or file corrupt.
    o The assignment is copied (from other student or ditto copy from handouts or internet).
    Uploading instructions
    Your Submission must include:

    1. A working Make File (Dev-C++ project File).
    2. All the Source Code (.h and .cpp files) necessary to compile and run your program.
    3. Place all the files in a folder then Zip this folder and Upload it on VU-LMS

    Note: Use Dev-C++ IDE.
    Objective
    The objective of this assignment is

    o To give you some practice exercise of linked list Data Structure.


    For any query about the assignment, contact at cs301@vu.edu.pk
    GOOD LUCK
    Marks: 20

    The Josephus problem is the following mass suicide "game": n people, numbered 1 to n, are sitting in a circle. Starting at person 1, a handgun is passed. After m passes, the person holding the gun commits suicide, the body is removed, the circle closes ranks, and the game continues with the person who was sitting after the corpse picking up the gun. The last survivor is tried for n - 1 counts of manslaughter. Thus, if m = 0 and n = 5, players are killed in order and player 5 stands trial. If m = 1 and n = 5, the order of death is 2, 4, 1, 5.

    Write a C++ program to solve the Josephus problem for general values of m and n using circular linked list data structure.


    Input:
     Number of People: n
     Number of Passes: m
    Output:
     Order in which people are removed
     The survivor

    Sample Run:
    Enter total number of People playing the game: 10
    Enter number of Passes: 3
    ----------------------------------------------------
    Game Started!
    ----------------------------------------------------
     Person removed: 4
     Person removed: 8
     Person removed: 2
     Person removed: 7
     Person removed: 3
     Person removed: 10
     Person removed: 9
     Person removed: 1
     Person removed: 6
    ----------------------------------------------------
     The survivor is : 5
    ----------------------------------------------------

    Sponsored Links

    Lectures Covered: This assignment covers Lecture # 1-5
    Deadline: Your assignment must be uploaded/submitted at or before 19/04/2011.

  2. #2
    alibaig
    Guest
    help plesjhhhhhhhhhhhhhhh

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 03-05-2012, 10:05 PM
  2. Replies: 0
    Last Post: 07-20-2011, 10:49 PM
  3. Replies: 0
    Last Post: 07-17-2011, 03:56 PM
  4. Replies: 1
    Last Post: 05-02-2011, 06:26 AM
  5. Replies: 3
    Last Post: 05-10-2010, 11:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft