Computers and Technology
Computers and Technology, 29.07.2019 18:30, angie249

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 . .

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, ariyanna029
What is added to the < meta > tag to describe the encoding type?
Answers: 2
image
Computers and Technology, 22.06.2019 13:00, Cookie320
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 24.06.2019 01:30, shonnybenskin8
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
Do you know the correct answer?
The number of lines that can be printed on a paper depends on the paper size, the point size of each...

Questions in other subjects: