subject

The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are doublespaced or single-spaced, the top and bottom margin, and the left and right margins of the paper. assume that all characters are of the same point size, and all lines are either single-spaced or double-spaced. note that 1 inch = 72 points. moreover, assume that the lines are printed along the width of the paper. for example, if the length of the paper is 11 inches and width is 8.5 inches, then the maximum length of a line is 8.5 inches.
write a program that calculates the number of characters in a line and the number of lines that can be printed on a paper based on the following input from the user:
a. the length and width, in inches, of the paper
b. the top, bottom, left, and right margins
c. the point size of a line
d. if the lines are double-spaced, then double the point size of each
character
assume:
all characters on a page have the same point size
all lines are either single spaced or double spaced
72 points = 1 inch
write a program that calculates the number of lines per page given the inputs:
length of paper in inches
top margin in inches (blank space)
bottom margin in inches (blank space)
point size of the font chosen (i. e. 12, 14, 16, 36, 72)
single spaced or double spaced
assume:
all characters on a page have the same point size
all lines are either single spaced or double spaced
72 points = 1 inch
write a program that calculates the number of lines per page given the
inputs:
length of paper in inches
top margin in inches (blank space)
bottom margin in inches (blank space)
point size of the font chosen (i. e. 12, 14, 16, 36, 72)
single spaced or double spaced

execute the following 3 test cases:

first run: output from your program:
enter the length of the paper: 11
enter the top margin of the paper: 2.5
enter the bottom margin of the paper: 1.75
enter the point size of a character: 14
enter line spacing, s or s (single spaced), d or d (double spaced): s
the number of lines that can be printed for single spacing: 34
press any key to continue . .

second run: output from your program:
enter the length of the paper: 12.4
enter the top margin of the paper: 2.2
enter the bottom margin of the paper: 1.8
enter the point size of a character: 12
enter line spacing, s or s (single spaced), d or d (double spaced): d
the number of lines that can be printed for double spacing: 25
press any key to continue . .

third run: output from your program:
enter the length of the paper: 111
enter the top margin of the paper: 2
enter the bottom margin of the paper: 2
enter the point size of a character: 12
enter line spacing, s or s (single spaced), d or d (double spaced): b
invalid line spacing
press any key to continue . .

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
Events and conditions that happen within an organization that are somewhat easier to deal with when responding to change are called
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
question
Computers and Technology, 24.06.2019 13:50
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
Answers: 1
You know the right answer?
The number of lines that can be printed on a paper depends on the paper size, the point size of each...
Questions
question
Mathematics, 13.01.2021 18:30
question
Mathematics, 13.01.2021 18:30
Questions on the website: 13722362