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, 21.06.2019 12:30
Which is the best web development company in pakistan?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Creating "smart interfaces" in all sectors of industry, government, and the public arena is one of the fastest growing hct areas. these interfaces model, interpret, and analyze such human characteristics as speech, gesture, and vision. the field of biometrics, in which humans authenticate themselves to machines, is an area of considerable interest to hct practitioners. fingerprint scans are one of the most frequently used biometric options, and this article, biometric student identification: practical solutions for accountability & security in schools, makes a case for the implementation of fingerprint scans in schools. critique the article, and answer the following questions: according to the author, what are the main benefits of adopting fingerprint scans in schools for student identification? according to the author, what are the main drawbacks of adopting fingerprint scans in schools for student identification? do you agree with the author's assessment of the pl
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
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, 02.06.2021 21:50
question
Mathematics, 02.06.2021 21:50
question
Mathematics, 02.06.2021 21:50
question
Mathematics, 02.06.2021 21:50
Questions on the website: 13722360