1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Svet_ta [14]
4 years ago
13

Largest. Write an algorithm that read 5 distinct integers and displays the largest value. Assume the input values are distinct i

ntegers. ISBN. The International Standard Book Number (ISBN) is a 10-digit code that uniquely specifies a book. The rightmost digit is a checksum digit that can be uniquely determined from the other 9 digits in the following manner: Multiply the first digit by 10, the second by 9, the third by 8, and so on, down to the ninth digit by 2. Add the values together. Divide the sum by 11. What is the remainder
Mathematics
1 answer:
Lorico [155]4 years ago
5 0

Answer:

Largest Number Algorithm

Input n1,n2,n3,b4,n5

if n1>=n2 and n1>=n3 and n1>=n4 and n1>=n5

Print n1 + "is the largest"

else if n2>=n1 and n2>=n3 and n2>=n4 and n2>=n5

Print n2 + "is the largest"

else n3>=n1 and n3>=n2 and n3>=n4 and n3>=n5

Print n3 + "is the largest"

else n4>=n1 and n4>=n2 and n4>=n3 and n4>=n5

Print n4 + "is the largest"

else

Print n5 + "is the largest"

End if

End

The remainder of a valid ISBN number is 0

ISBN Algorithm

input isbnnum

Length = Length(isbnnum)

if Length != 10 then

return false;

end if

Checksum = 0

kounter = 0

do

Num = isbnnum[kounter] - '0'

if 0 > Num or 9 < Num then

return false

end if

Checksum = Checksum + (Num * (10 - kounter))

kounter = kounter + 1

while(kounter < 9)

lastnum = isbnnum[9]

if lastnum != 'X' and (lastnum < '0' or lastnum > '9') then

return false;

end if

if lastnum == 'X' then

Checksum = Checksum + 10

else

Checksum = Checksum + (lastnum - '0')

end if

if Checksum % 11 == 0 then

Print "Checksum is "

Print Checksum

Print "Remainder is"

Print Checksum % 11

Step-by-step explanation:

The first algorithm determines the largest of 5 numbers

It first accepts input for 5 numbers named n1 to n5

Then it checks one after the other, the largest of the 5 numbers

The second algorithm determines an ISBN Number

1 : This line takes input for ISBN number in variable isbnnum

2 : This line computes the length of variable isbnnum

3: This line checks if the length of the isbnnum is equal to 10

4: If the length is not equal to 10, the algorithm stops execution

6,7: These lines initialise the variable checksum and kounter to 0

8 to 15: These lines compute the checksum using an iterative do loop statement

16: This line saves the last character of variable isbnnum to variable lastnu

17,18,19: These lines checks is lastnum is not X and it is not a number, the algorithm is stops execution of true

20 to 24: These lines add or remove the last character from the checksum

25 to 27: These lines check if the checksum can be divided by 11. If yes, the checksum is printed

28,29: These lines print the remainder, which is 0.

You might be interested in
The tennis ball has a radius of 10 cm. Calculate the approximate volume of the tennis ball. Round to the nearest tenth
marissa [1.9K]
The formula is V = (4/3) pi * r^3
r = 10 cm^3 = 1000 cm^3 That let's out D
V = (4/3) * 3.14 * 1000
V = (1.3333) * 3.14 * 1000
V = 1333 * 3.14
V = 4185 cm^3
A <<<< ==== answer
6 0
3 years ago
A customer's stock value seems to be rising exponentially. The equation for
Alisiya [41]
It would be 10.4!!!!!!
8 0
3 years ago
NEED HELP, PLEASE SHOW WORK. :(((
sukhopar [10]

Answer:

About 34 workers

Step-by-step explanation:

200/30 to find on average how many trees can be carved by one worker

The answer is 6.666, so just 6

Then 6*4=24 to figure out how many more trees can be carved by (4 more) workers

So, add 4 to 30 and about 224 trees can be carved.

8 0
3 years ago
Find the equation for the line passing through the point (−3,−3) and perpendicular to the line whose equation is −1x+2y+2=0.
RSB [31]
First we have to figure out the slop of the given equation:
-1x+2y+2=0
y=1/2x - 1 

So the slope is 1/2. A line perpendicular to this line has a slope of the negative reciprocal of this slope. So the slope of the line you want to find is -2.

So:  y +3 = -2(x+3).

And you can expand into the form that you want (or just keep it this way). :)
6 0
4 years ago
Bricklayers use the formula N = 7LH to estimate the number of bricks N needed to build a wall of height H and length L. What is
miv72 [106K]
Plug in 30ft for L and 2310 for n so you will get 2310=7(30)(h)... h would equal 11ft

8 0
3 years ago
Other questions:
  • Which relationship is a direct variation?
    12·2 answers
  • Question Help If the heights of male college basketball players and female basketball players are used to construct a​ 95% confi
    14·1 answer
  • 10. Your Turn: Find the equation of a line that is perpendicular to y=2x+7, and passes through the point (-4, 7). SHOW YOUR WORK
    11·1 answer
  • What is the solution to this equation?
    6·1 answer
  • MATH HELP 15 POINTS<br><br> MUST ANSWER BOTH QUESTION!
    8·2 answers
  • Justina wanted to create a graph showing how much money she earned each day in a month. Which type of graph would be the most ap
    12·1 answer
  • Find f(2) if f(x) = (x + 1)2
    9·1 answer
  • Please help me with my math question.
    9·1 answer
  • Which explains whether or not the values in the table represent a direct variation?
    14·1 answer
  • Write the equation of a line whose roots are -5 and -6
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!