C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 12, Problem 12.8E
Program Plan Intro

Program plan:

  1. Item, start variablesare used for input. There is structure listnode having data, nextPtr member variables which represents the linked list node.
  2. void insert(node **head, int value) function inserts the node in the a linked list.
  3. void calculate (node *flist) functioncalculate the sum of the contents of the linked list and then calculate the average value and display the result.
  4. void printList(node *head) function display the contents of the linked list.

Program description:

The main purpose of the program is to create linked list of 25 values which are generated randomly. Then sum and average of these values are calculated and displayed.

Blurred answer
Students have asked these similar questions
1. (Store numbers in a linked list) Write a program that lets the user enter numbers and displays numbers as described below. Use a linked list to store the numbers. Do not store duplicate numbers. Add the methods Sort, Shuffle, and Reverse to sort, shuffle, and reverse the list in the application class (driver class). Please submit the source code and bytecode.
1. (Store numbers in a linked list) Write a program that lets the user enter numbers and displays numbers as described below. Use a linked list to store the numbers. Do not store duplicate numbers. Add the methods Sort, Shuffle, and Reverse to sort, shuffle, and reverse the list in the application class (driver class).
please code in python Forbidden concepts: arrays/lists (data structures), recursion, custom classes Create a program that takes a password string from the user and encrypts the letters to go up or down the alphabet using a triple-number key. The amount up or down for the encryption of the alphabetical characters will depend on the input from the user. Input for the encryption key integers will be -25 ≤ key ≤ 25.For example, ‘CHICKEN’ with a 1, 2, -3 would be C up 1 to D, H up 2 to J, I down 3 to F,then C up 1 to D, K up 2 to M, E down 3 to B, and N up 1 to O. Thus the encryption becomes ‘DJFDMBO’.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education