Computer Science: A Structured Programming Approach Using C, Third Edition
Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
bartleby

Videos

Textbook Question
Book Icon
Chapter 5, Problem 57PS

Write a program that asks the user to enter the current date and a person's birth date in the form month, day, year. The program then calculates the person's age in integral years. Use separate functions to enter the dates (pass by address), calculate the person's age, and print the results. Test your program with the following dates: 11/14/1957, 5/10/1989, and 1/5/2000.

Blurred answer
Students have asked these similar questions
Write a Python program that asks user to enter the month (1-12) and the year. The program should then display the number of days in that month. Use the following criteria to identify the leap year If the year is divisible by 100, then it is a leap year if and only if it is divisible by 400.              Example, 2000 is a leap year and 2100 is not a leap year if the year is divisible by 100, then it is a leap year if and only if it is divisible by 4.    Example, 2008 is a leap year but 2009 is not Here is a sample run of the program:  Enter a month (1-12) :  2   Enter a year : 2008 2008 is a leap year and there are 29 days in the month of February. Note:  You may create a function to calculate the leap year and a function to convert the month in String ( ex: 2   = February)
Write a program which should display 4 items (keyboard, mouse, monitor and speaker) with their product numbers (1111, 1112, 1113 and 1114) and Rate/Unit (3,000, 2,000, 30,000, 10,000) respectively. Customer will enter the product code and quantity to be purchased. Customer can select one product at a time. Your program will display the Product Number, Product Name, Rate, Quantity Purchased and Total cost (Quantity x Rate) on the screen. If Total cost is greater than Rs. 5,000/= then a discount of 10% will be given to the customer. Display discounted figure on the screen and then print the amount payable (cost- discount) on the screen.
Snowball fight Write a programto calculate the volume of snow needed for a snowball fight. Use separate functions to: Print directions / an intro message to the user. Read the number of snowballs from the user. Calculate the volume of a snow required for the snowballs, in cubic feet. Use a constant of 4 inches for the diameter. Print the snowball size, number of snowballs and volume of snow needed. Use 1 decimal place for the snowball size and snow volume. Youroutput should be nicely formatted, with units. Complete the CSC 150 Design Document for your program. Draw a Structure Chart in the space at the top of the document. Below, give the prototype and a brief description for each function. The space in between is for the variables that you're defining in 'main'. It's helpful to list these before you write your function prototypes. A blank design document is available in the Content and Drop box tools. Submit your completed Design Document in the Program3 Design drop box by the due…

Chapter 5 Solutions

Computer Science: A Structured Programming Approach Using C, Third Edition

Ch. 5 - There are two different ways to implement a...Ch. 5 - Which of the following statements about switch...Ch. 5 - Which of the following statements about the...Ch. 5 - Prob. 14PSCh. 5 - Prob. 15PSCh. 5 - If x=0,y=5,z=5, what is the value of x, y, and z...Ch. 5 - If x=3,y=0,andz=4, what is the value of the...Ch. 5 - Simplify the following expressions by removing the...Ch. 5 - Prob. 19PSCh. 5 - If originally x=4,y=0,andz=2, what is the value of...Ch. 5 - If originally x=4,y=0,andz=2, what is the value of...Ch. 5 - If originally x=4,y=0,andz=2, what is the value of...Ch. 5 - If originally x=4,y=0,andz=2, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=4,y=0,andz=2, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=0,y=0,andz=1, what is the value of...Ch. 5 - If originally x=2,y=1,andz=1, what is the value of...Ch. 5 - If originally x=1,y=3,andz=0, what is the value of...Ch. 5 - Evaluate the value of the following expressions:...Ch. 5 - Evaluate the value of the following expressions:...Ch. 5 - Write an if statement that will assign the value 1...Ch. 5 - Prob. 36PSCh. 5 - Write the code to add 4 to an integer variable,...Ch. 5 - Prob. 38PSCh. 5 - Write the code to print either zero or not zero...Ch. 5 - If the variable divisor is not zero, divide the...Ch. 5 - Prob. 41PSCh. 5 - Rewrite the following code using one if statement:...Ch. 5 - Rewrite the following code fragment using one...Ch. 5 - Write a code fragment that tests the value of an...Ch. 5 - Prob. 45PSCh. 5 - Prob. 46PSCh. 5 - Write a function called smallest that, given three...Ch. 5 - Prob. 48PSCh. 5 - Write a function called month_of_year that, given...Ch. 5 - Write a function called parkingcharge that, given...Ch. 5 - Prob. 51PSCh. 5 - Complete the incremental implementation of Program...Ch. 5 - Write a program that determines a student's grade....Ch. 5 - Prob. 54PSCh. 5 - Given a point, a line from the point forms an...Ch. 5 - Prob. 56PSCh. 5 - Write a program that asks the user to enter the...Ch. 5 - Prob. 58PSCh. 5 - This program is a simple guessing game. The...Ch. 5 - Write a program that, given a person's birth date...Ch. 5 - Write a program that calculates the change due a...Ch. 5 - Write a menu-driven program that allows a user to...Ch. 5 - Write a program that tests a user-entered...Ch. 5 - Write a program to compute the real roots of a...
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
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Computer Programming for Beginners | Functions, Parameters & Arguments | Ep24; Author: Programming With Avelx;https://www.youtube.com/watch?v=VXlh-qJpfw0;License: Standard YouTube License, CC-BY