Preview

Arithmetic Mean and Program

Good Essays
Open Document
Open Document
1086 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Arithmetic Mean and Program
Write which populates an array with integer values read from a file. The program must take the items in the array and reverse them. You may use one array only to solve this problem. Write a program that array and determine how many times each integer was generated. Use a second array of size 101 to keep track of the number of times each integer was generated. Initialize each item in the second array to 0. For each item in the first array, use it as the index into the second array and increment the contents found in the second array at the corresponding index. Note: for this problem we are willing to trade memory efficiency (the second array is mostly unused) for time efficiency. 9 on p. 448 of your Hanly & Koffman Problem Solving and Program Design in C text. Write an interactive program that plays a game of hangman. Store the word to be guessed in successive elements of an array of individual characters called word (note: this is not a string!). The player must guess the letters belonging to word. The use another array, guessed, to keep track of the solution so far. Initialize all elements of guessed to the '*' symbol. Each time a letter in word is guessed, replace the corresponding '*' in guessed with that letter.

Programming Projects 1. The results of a true-false exam given to a computer science class has been coded for input to a program. The information available for each student consists of a student identification number and the student's answers to ten true-false questions. The available data are as follows: 2. Student 3. identification Answer string 4. 5. 0080 FTTFTFTTFT 6. 0340 FTFTFTTTFF 7. 0341 FTTFTTTTTT 8. 0401 TTFFTFFTTT 9. 0462 TTFTTTFFTF 10.

You May Also Find These Documents Helpful

  • Satisfactory Essays

    = z) return true; else return false; } Problem 5 a. Output: 720 b. Output: 0 c. Output: 71 d. Output: 362880 Problem 6 a. Output: “Take Programming I.” b. Output:…

    • 188 Words
    • 1 Page
    Satisfactory Essays
  • Better Essays

    Nt1310 Unit 4

    • 3614 Words
    • 15 Pages

    The program is trying to collect the value of a "void" function into an integer variable.…

    • 3614 Words
    • 15 Pages
    Better Essays
  • Satisfactory Essays

    Step 2: Think of good variable names for the following pieces of data that will need to be stored with in this program.…

    • 777 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Problem Set 1 302 2014T1

    • 1095 Words
    • 5 Pages

    (e) Let’s say you had to guess to answer to (d) based on the results in (b), (c) without…

    • 1095 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Activity 1: write a program in java to interchange (swap) values of two variables with a use of 3rd variable.…

    • 2338 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    22.Write a program to read a sequence of characters and display them in reverse order on the next line. Page: 144…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Pt1420 Unit 1 Assignment 2

    • 1305 Words
    • 6 Pages

    Das, D., Gregersen, E., Hosch, L., Lotha, G., Sampaolo, M., Sinha, S. (2014). C++. In Encyclopedia Britannica.…

    • 1305 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Biology Quiz Paper

    • 1178 Words
    • 5 Pages

    | | | Student Response | Value | Correct…

    • 1178 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Comp 122 Week 1 Ilab

    • 662 Words
    • 3 Pages

    5. Write the program to implement your algorithm. Test your program using your test cases. Did your program produce the values predicted in your test cases? Explain.…

    • 662 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CMIS 102 Homework 3

    • 342 Words
    • 3 Pages

    Program Description - This program will allow a user to input their name and final grades from their courses and calculate their GPA accordingky. The amount of students as well as the amount of classes each student is taking, are undetermined.…

    • 342 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    COS wa 10

    • 297 Words
    • 2 Pages

    Create a set/list of enumerated constants called week that contains the days of the week. Have a variable called today that is of type week. Assign a value to today. If the day is Monday through Friday, print "Go to work!" If the day is Saturday or Sunday, print "You can rest today!"…

    • 297 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Lab 3 Student

    • 1264 Words
    • 7 Pages

    Step 1: This program is most easily solved using just a few variables. Identify potential problems with the following variables declared in the pseudocode. Assume that the college has the ability to offer half credits. (Reference: Variable Names, page 39-40).…

    • 1264 Words
    • 7 Pages
    Satisfactory Essays
  • Powerful Essays

    what ever

    • 1175 Words
    • 5 Pages

    Three employee initials; the number of hours worked; the hourly rate of pay for the employee. Calculate and output the employee's gross pay, deductions, and net pay. Deductions include the following:…

    • 1175 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    1. A statistics professor has just given a final examination in his statistical inference course. He is particularly interested in learning how his class of 40 students performed on this exam. The scores are shown below.…

    • 814 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Psychology Assignment

    • 1556 Words
    • 7 Pages

    10. College XYZ wants to collect information from students concerning a plus/minus grading system (the college administration wants to add minus grades to the plus values…

    • 1556 Words
    • 7 Pages
    Good Essays