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, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
When a new name is registered on the internet, the process can take two hours to four hours four hours to three days two hours to two days one hour to eight hours
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, 17.12.2020 15:00
question
English, 17.12.2020 15:00
question
Mathematics, 17.12.2020 15:00
question
Social Studies, 17.12.2020 15:00
question
Computers and Technology, 17.12.2020 15:00
question
Law, 17.12.2020 15:00
Questions on the website: 13722363