Preview

CS159 HW1

Satisfactory Essays
Open Document
Open Document
319 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
CS159 HW1
CS 159 – HW #01
5 Points Possible
Due: September 6, 2010 at 11:00pm.
Problem: Given the coordinates of two points, determine the shortest distance between the two points
(green line) and the rectilinear distance (red, blue, and yellow lines all represent the same distance).
All inputs are integer values.
You are permitted to use mathematical functions for square root, power, and absolute value as necessary.

Example Execution #1:

Example Execution #2:

Enter the first point: 0 0
Enter the second point: 6 6

Enter the first point: 1 5
Enter the second point: 5 1

Shortest distance between points: 8.49
Rectilinear distance between points: 12

Shortest distance between points: 5.66
Rectilinear distance between points: 8

Additional Requirements:




DO NOT use any material found outside of the first THREE chapters of the C text.
Accept input and produce output exactly as seen in the example executions.
A program must compile to be considered for partial credit.

Academic Integrity Reminder:


Please review the policies of the course as they relate to academic integrity. The assignment you submit should be your own original work. You should be consulting only course staff regarding your specific algorithm for assistance.

Here are a few of the course standards to remember:
1. Include the head_hw header on top of your assignment (found in your CS159 directory).
2. Indent all code found inside of the main function exactly two additional spaces.
3. Comment all variables (ALL VARIABLES) to the right of where they are defined.
When you submit... only the last attempt of a submission is kept for grading. All other submissions are overwritten and cannot be recovered. You may make multiple submissions but only the last attempt is retained and graded. Assignment deadlines... are firm and the electronic submission will disable promptly as advertised. We can only grade what you submit as expected (including the correct lab

You May Also Find These Documents Helpful

  • Powerful Essays

    Acct5910 Course Outline 2013

    • 4001 Words
    • 17 Pages

    CLASS WEEK COMMENCING TOPIC TEXTBOOK READING* QUESTIONS/CASE STUDIES PART B: KEY POLICIES, STUDENT RESPONSIBILITIES AND SUPPORT 1 2 ACADEMIC HONESTY AND PLAGIARISM STUDENT RESPONSIBILITIES AND CONDUCT…

    • 4001 Words
    • 17 Pages
    Powerful Essays
  • Good Essays

    Adm2336 Final Exam

    • 4399 Words
    • 18 Pages

    Final Exam ADM 2336 Sections B & C Organizational Behaviour December 10, 2006 Professor: Jules R. Carriere, Ph.D. CAREFULLY READ AND FOLLOW THESE INSTRUCTIONS: 1) Answer all questions. Write your answers computer readable answer sheet and follow the marking directions. 2) Books and notes are prohibited. All calculators, cellular phones and dictionaries are prohibited. 3) Do not ask the professors or invigilators to interpret the exam questions. 4) Do not remove the staple. 5) Return all examination materials (including the questionnaire) before leaving the examination hall. 6) Complete the peer evaluation form before leaving the examination hall. Statement of Academic Integrity The School of Management does not condone academic fraud, an act by a student that may result in a false academic evaluation of that student or of another student. Without limiting the generality of this definition, academic fraud occurs when a student commits any of the following offences: plagiarism or cheating of any kind, use of books, notes, mathematical tables, dictionaries or other study aid unless an explicit written note to the contrary appears on the exam, to have in his/her possession cameras, radios (radios with head sets), tape recorders, pagers, cell phones, or any other communication device which has not been previously authorized in writing. Statement to be signed by the student: I have read the text on academic integrity and I pledge not to commit or attempt to commit academic fraud in this examination. Signed: Note: an examination copy or booklet without that signed statement will not be graded and will receive a final exam grade of zero.…

    • 4399 Words
    • 18 Pages
    Good Essays
  • Satisfactory Essays

    Is Trash

    • 289 Words
    • 2 Pages

    • The heading on the first page must include your complete name, student number, section number, name of the assignment, turnitin confirmation number and name of professor.…

    • 289 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Uos Outline

    • 3186 Words
    • 13 Pages

    on Academic Honesty, Special Consideration, and all applicable policies that apply to every unit of study offered…

    • 3186 Words
    • 13 Pages
    Satisfactory Essays
  • Good Essays

    Proctor Reflective Report

    • 262 Words
    • 2 Pages

    be willing to comply with policies and procedures to ensure the integrity of the exam process;…

    • 262 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Appendix a - 2

    • 1811 Words
    • 6 Pages

    The first checkpoint submission in this course is designed to make sure you are all aware of some key components in this class, i.e. policies, academic integrity, citing and referencing. For some of you, much of this may be old stuff - that just means this will be an easy set of points to earn. For some of you this may be relatively new information. If you do not know this information it can result in substantial point loss during the course, so I have found that a refresher during this first week results in higher grades earned throughout the course. Read the following, answer as requested, and submit your responses.…

    • 1811 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    Polling America

    • 623 Words
    • 3 Pages

    Follow these procedures: If requested by your instructor, please include an assignment cover sheet. This will become the first page of your assignment. In addition, your assignment header should include your last name, first initial, course code, dash, and assignment number. This should be left justified, with the page number right justified. For example:…

    • 623 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    4. Please attach a cover page that MUST include assignment title, group names & ID, course #, my name & submission date.…

    • 774 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Statics Tutorial

    • 303 Words
    • 2 Pages

    Measure the distance between the two points directly by using the measuring devices provided and compare with above result. Calculate the distance between the points and compare with 4).…

    • 303 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Distance Formula Activities III: Students will find the distance between 2 points using the distance formula and the Pythagorean Theorem will also be reviewed. Students should be able to find the distance between 2 points on a coordinate plane after these activities.…

    • 427 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Prison Population Growth

    • 1165 Words
    • 5 Pages

    I have read and understood the Academic Integrity rules and regulations for Kaplan Open Learning and the University Of Essex, and declare that this assignment bides by all of the rules and regulations contained within it.…

    • 1165 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Fish Farming

    • 1616 Words
    • 7 Pages

    Fish farming in Canada has recently taken quite the spot light, for good or for worse that is still the question that needs to be addressed. I feel the negatives greatly outshine the positives at this point in time. As the wild salmon stocks are currently in danger fish farming is taking double the amount of wild salmon to produce half the amount of farmed fish. The fish that is coming from the farms is iffy to say the least; it is a chemical, disease ridden product not beneficial for consumption. There are many issues around the benefits of the actual fish, and what it might do to the wild if they are interbred and mixed among the wild salmon. Along with the negatives come some benefits of these farms. There is a major industry with fish farming which produces very profitable revenues. With these high revenues comes thousands of full time and part time jobs for people that otherwise would be unemployed. Like most industry’s there are many issues that need to be worked on, With some time and money I think fish farming could continue to be profitable while being less harmful on the environment and producing a better healthier food source.…

    • 1616 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Graphs In Data Structure

    • 1178 Words
    • 21 Pages

    Graphs - Introduction Terminology Graph ADT Data Structures Reading: 12.1-12.2 COSC 2011, Summer 2004 Definition • A graph is a pair (V, E), where – V is a set of nodes, called vertices – E is a collection of pairs of vertices, called edges • Both are objects (i.e. store data) G E B F A Vertex city computer web page airport C…

    • 1178 Words
    • 21 Pages
    Good Essays
  • Good Essays

    Activity Of Maths CLass X

    • 850 Words
    • 4 Pages

    And draw a set of perpendicular axes on the graph paper. As PM and QN on the axis.…

    • 850 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Faith

    • 797 Words
    • 4 Pages

    I read and understand Strayer University’s Academic Integrity Policy listed in the Syllabus II of our classroom. In submitting this assignment, I assert that I acknowledged all sources, whether quoted or summarized, in APA citation style. I did not receive unauthorized assistance. I understand that violations of the Academic Integrity Policy will lead to disciplinary action against me, up to and including suspension or expulsion from the University. I understand that all students play a role in preserving the academic integrity of the University and have an obligation to report violations of the Academic Integrity Policy committed by other students.…

    • 797 Words
    • 4 Pages
    Satisfactory Essays