C Programming Language
C Programming Language
2nd Edition
ISBN: 9780131103627
Author: Brian W. Kernighan, Dennis M. Ritchie, Dennis Ritchie
Publisher: Prentice Hall
bartleby

Videos

Textbook Question
Book Icon
Chapter 1, Problem 13E

Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging.

Blurred answer
Students have asked these similar questions
The area of a rectangle is the rectangle’s length times its width. Write a program that asks for the length and width of two rectangles.  The program should tell the user which rectangle has the greater area, the lesser area or if the areas are the same. Allow the user to continue to ask for measurements of two rectangles until he/she wishes to quit.
Suppose a right triangle is placed in a plane asshown below. The right-angle point is placed at (0, 0), and the other two pointsare placed at (200, 0) and (0, 100). Write a program that prompts the user to entera point with x- and y-coordinates and determines whether the point is inside thetriangle. Here are the sample runs: Enter a point’s x- and y-coordinates: 100.5 25.5 ↵EnterThe point is in the triangle
Write a program that reads from the user a character ('q' or 'c'). If the character is 'c', the program reads from the user the radius rof a circle and prints its area. • If the user enters 'q', the program asks the user to enter the length and width of a quadrilateral. We assume the quadrilateral is either a square or rectangle. You should print if the quadrilateral is square or rectangle. • Otherwise, it prints "Wrong character" PS: Use the following formulas: area of circle=3.14*r Sample Run1: Enter a character (q or c): q Enter the Length and Width: 80 150 |It is a rectangle Sample Run2: Enter a character (q or c): q Enter the Length and Width: 80 80 It is a square Sample Run3: Enter a character (q or c): c Enter the radius: 2 The area of the circle is 12.56 Sample Run4: Enter a character (q or c): d Wrong character

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY