Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 6, Problem 4E
Write a
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a program that prompts the user to enter an integer value in an array,
and user can also print out some values.
2. you have data of size 499 byte stored in an array starting at
45000H, write a program to check the data if it is positive store
it in memory location starting at 47000H, if it is negative
change it into positive and store it in the same array
Write a program that calculates the average of an array of 5 floating-point values. (Ask the
user to enter the five floating-point values
Chapter 6 Solutions
Programming in C
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
(Displaying a Square of Asterisks) Write a method squareOfAsterisks that displays a solid square (the same numb...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
To what extent will our decisions regarding technology in general, and computer technology in particular, affec...
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Average Steps Taken A Personal Fitness Tracker is a wearable device that tracks your physical activity, calorie...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
The following statement calls a function named half, which returns a value that is half that of the argument pa...
Starting Out with C++: Early Objects
Is it ethical to design an algorithm for performing an illegal act? Does it matter whether the algorithm is eve...
Computer Science: An Overview (12th Edition)
In the following exercises, write a program to carry out the task. The program should use variables for each of...
Introduction to Programming Using Visual Basic (10th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a program that reads student scores into an array, gets the best score, and then assigns grades based on the following scheme: • Grade is A if score is • Grade is B if score is • Grade is C if score is • Grade is D if score is • Grade is F otherwise. best - 10 best - 20; best - 30; best - 40; The program prompts the user to enter the total number of students, then prompts the user to enter all of the scores, and concludes by displaying the gradesarrow_forwardWrite a program which asks user to enter total number of customers who have bought fruits today, create an array dynamically, then asks user to enter quantity of fruit bought and price per kg of item ( e.g. for one kg apple= 200rs.) calculate the bill and stores the bill in the array. At the end you have to display the total earning of the shop in a day.arrow_forwardWrite a program that asks the user to input the sales of 10 salesperson and store them in an array. The program should output the sales of each salespersons in the below shown format. Also the program should output the count of the sales that are > $2000 , and the highest sales value . Please solve this question in C++ language quicklyarrow_forward
- In C++, write a program that divides a binary number by a multiple of 2. Create an array, called num1 of characters, 10 chars long. Enter a binary number in the array and divide by binary 10 and 1000arrow_forwardWrite a program that lets the user enter the total rainfall for each of 12 months (starting with January) into an array of doubles. The program should calculate and display (in this order): the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts. Months should be expressed as English names for months in the Gregorian calendar, i.e.: January, February, March, April, May, June, July, August, September, October, November, December. Do not accept negative numbers for monthly rainfall figures. When a negative value is entered, the program outputs "invalid data (negative rainfall) -- retry" and attempts to reread the value. NOTE: Decimal values should be displayed using default precision, i.e. do not specify precision.arrow_forwardCreate a program which validates whether a given array alternates between positive and negative numbers.Array size: 6 Examples: Input: [3, -2, 5, -5, 2, -8] ➞ Output: true Input: [-6, 1, -1, 4, -3, 4] ➞ Output: true Input: [4, 4, -2, 3, -6, 10] ➞ Output: falsearrow_forward
- Write a program that inputs ten numbers in an array and displays the minimum number.arrow_forward2. In JAVA programming language write a program to input the elements of two integer arrays A1, A2 of size 10 and then print the absolute difference of the average of the arrays A1 and A2. The average of an array is the average of all the elements of the array.arrow_forwardWrite a program that asks the user to input the number of elements of an integer array and its elements. The program then reverses the order of the elements of the inputted array. In C languagearrow_forward
- Question: Write a program that reads 10 integer numbers and store them in an array of size 10. Your program should find and display how many numbers in the array divisible by 2. Sample Input/Output: Enter 10 numbers: 12 4 2 5 7 30 11 3 21 There are 4 numbers divisible by 2.arrow_forwardCreate the following program using Python,you may use Replit for a free version of Python. Use loops to input a list of employee names and salaries and store them in parallel arrays. End the input with a sentinel value. The salaries should be floating point numbers and Salaries should be input in even hundreds. For example, a salary of 36,510 should be input as 36.5 and a salary of 69,030 should be entered as 69.0. Find the average of all the salaries of the employees. Find the highest and the lowest of all salaries. Display the following using proper labels: 1.Display the names and salaries of all the employees. 2. Display the average of all the salaries (for example, " The average of all salaries is $30000" ) 3. Display the highest of all the salaries 4. Display the lowest of all the salaries Please inculde header comments. If possible include step comments. Name of the submission - Employee Salaries Author of the submission - John Smith Summary/goal of the submission…arrow_forwardIn Python: Write a program that reads two sets of exam scores of five students from user input and stores the scores into two NumPy arrays (exam1 and exam2). The program then calculates the average of the two exams for each of the five students and outputs the average scores as a NumPy array. The program finally counts the number of average scores that are 80 or higher and outputs the count. Ex: If the input of the two sets of scores are: 75 80 65 82 92 88 85 75 95 73 where [75 80 65 82 92] is stored in NumPy array exam1, and [88 85 75 95 73] is stored in NumPy array exam2. The program then outputs: Average scores: [81.5 82.5 70. 88.5 82.5] Number of students who received 80 and above: 4arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Definition of Array; Author: Neso Academy;https://www.youtube.com/watch?v=55l-aZ7_F24;License: Standard Youtube License