Nine coins are placed in a 3x3 matrix with some face up and some face down. you can represent the state of the coins using a 3x3 matrix with values 0 (heads) and 1 (tails). here are some examples: 0 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 1 each state can also be represented using a binary number. for example, the preceding matrices correspond to the numbers: 000010000 101001100 110100001 there are a total of 512 possibilities, so you can use decimal numbers 0, 1, 2, 3,...,511 to represent all the states of the matrix. write a program that prompts the user to enter a number between 0 and 511 and displays the corresponding matrix with the characters h and t.

Answers

Answer 1
Hello,

Here is the program in QB64

CONST Ordre = 3
DIM SHARED mat(1 TO Ordre, 1 TO Ordre) AS INTEGER, n AS INTEGER
CALL ReadN
CALL MakeMat
CALL SeeMat
END

SUB ReadN
SHARED n AS INTEGER
DIM k AS INTEGER
INPUT "0<=n<=511"; k
IF k < 0 OR k > (2 ^ (Ordre * Ordre)) - 1 THEN PRINT "erreur de valeur de n"; n: END
n = k
END SUB

SUB MakeMat
SHARED mat() AS INTEGER, n AS INTEGER
DIM i AS INTEGER, j AS INTEGER, x AS INTEGER
x = n
FOR i = 1 TO Ordre
    FOR j = 1 TO Ordre
        mat(i, j) = x MOD 2
        x = INT(x / 2)
    NEXT j
NEXT i
END SUB

SUB SeeMat
SHARED mat() AS INTEGER
DIM i AS INTEGER, j AS INTEGER
FOR i = 1 TO Ordre
    FOR j = 1 TO Ordre
        IF mat(i, j) = 0 THEN
            PRINT "h|";
        ELSE
            PRINT "t|";
        END IF
    NEXT j
    PRINT " "
NEXT i
END SUB





Related Questions

A fireman, 57.6 m away from a burning building, directs a stream of water from a fire hose at an angle of 35.2° above the horizontal. if the initial speed of the stream is 42.7 m/s, at what height will the stream of water strike the building?​

Answers

First calculate the time it takes to reach the building using the x-component of the velocity.

t = 57.6 m / (42.7 m/s * cos35.2) = 1.65 s

 

Then we calculate the height y using the y-component of the velocity:

y = (42.7 m/s * sin35.2) * 1.65 s – 0.5 (9.81 m/s^2) (1.65 s)^2

y = 11.26 m

Final answer:

Using principles of projectile motion and given the initial speed, angle of projection, and horizontal distance, the stream of water from the fire hose will strike the building at a height of approximately 20.3 meters.

Explanation:

To determine at what height the stream of water will strike the building, we need to apply the principles of projectile motion. We are given the initial speed of the water stream (42.7 m/s), the angle of projection (35.2 degrees), and the horizontal distance from the fireman to the building (57.6 meters).

First, we separate the initial velocity into horizontal (ux) and vertical (uy) components:

ux = u * cos(θ) = 42.7 m/s * cos(35.2°) = 42.7 m/s * 0.8192 ≈ 35.0 m/s

uy = u * sin(θ) = 42.7 m/s * sin(35.2°) = 42.7 m/s * 0.5759 ≈ 24.6 m/s

Next, we use the formula for the horizontal motion to find the time (t) it takes for the water to reach the building:

x = ux* t => 57.6 m = 35.0 m/s * t => t ≈ 1.65 s

Finally, we can calculate the vertical distance (y) using the time and the vertical component of the velocity:

y = uy*t - (1/2) * g * t2 = 24.6 m/s * 1.65 s - (0.5 * 9.81 m/s2 * (1.65 s)2) ≈ 20.3 m

Therefore, the stream of water will strike the building at a height of approximately 20.3 meters above the ground.

Priscilla has 56 stickers in her collection. Write the prime factorization of 56

Answers

It can be:
2x2x2x2x7
Or, it can be:
2^3x7

Hope it helped :)

Answer:

Prime factorization: 56 = 2 x 2 x 2 x 7.

Step-by-step explanation:

Given  : 56

To find : Write the prime factorization.

Solution : We have given number 56.

Prime factorization : Factors of 56 as prime number

56 = 56 = 1 x 56, 2 x 28, 4 x 14, or 7 x 8.

Prime factorization: 56 = 2 x 2 x 2 x 7

Therefore, Prime factorization: 56 = 2 x 2 x 2 x 7.

At 4:00 am the outside temperature was 28*F. By 4:00 pm that same day it rose to 38 degrees.

Answers

The temperature is 66*F.

The temperature at 4:00 pm will be 66° F.

What are Integers?

An integer is a number with no decimal number or fractional part.

Given that;

At 4:00 am the outside temperature was 28*F. By 4:00 pm that same day it rose to 38 degrees.

Now, The temperature at 4:00 pm is calculated as;

= 28° F + 38° F

= 66° F.

Thus, The temperature at 4:00 pm will be 66° F.

Learn more about the integers visit:

https://brainly.com/question/26478372

#SPJ2

The complete question is this;

At 4:00 am, the outside temperature was 28*F. By 4:00 P.M. it rose 38 degrees. What was the temperature at 4:00 P.M. ?

If y= -6 when x= -24 what is the value of x when y= -7

Answers

x= -28. That should be correct! Hope this helps! 
y= - 6, x = -24

-6 x 4 = -24

-7 x 4 = -28

x = -28

hope this helps

please help me what is 1462 ÷ 58 as a mixed number then put it in simplest form

Answers

25.20, that might help you hopefully!

Make s the subject of the formula t to the power of 2
= 2p+as

Answers

2=2p+as
2-2p=as
2-2p/a=s

Which is the graph of f(x) = 100(0.7)x?

Answers

Answer:

a

Step-by-step explanation:

a baker makes cakes and sells them at county fairs his initial cost was $45 to reserve a booth and $25 traveling expenses. He figures that it costs $1.75 to make each cake and he charges $6.50 per cake. Let x represent the number of cakes sold. Express the revenue R and Cost C as functions of x. Then find how many cakes will he need to sell before he will make a profit

Answers

Final answer:

The baker's revenue R can be expressed as R = x * 6.50, and the cost C can be expressed as C = 45 + 25 + (x * 1.75). To find the number of cakes he needs to sell before making a profit, we set the revenue equal to the cost and solve for x. The baker will need to sell at least 15 cakes before making a profit.

Explanation:

To express the revenue R as a function of x, we can use the equation R = x * 6.50. This is because the revenue is the number of cakes sold multiplied by the price per cake. So, every cake sold contributes $6.50 to the revenue.

To express the cost C as a function of x, we can use the equation C = 45 + 25 + (x * 1.75). The initial fixed costs of $45 for reserving a booth and $25 for traveling expenses are added to the variable costs of $1.75 per cake multiplied by the number of cakes sold.

To find the number of cakes he needs to sell before making a profit, we need to set the revenue equal to the cost and solve for x:

R = C => x * 6.50 = 45 + 25 + (x * 1.75)

Combining like terms, we get:

4.75x = 70

x = 70 / 4.75

x ≈ 14.74

Since you cannot sell a fraction of a cake, the baker will need to sell at least 15 cakes before making a profit.

A college student borrow ​$1,500 for 3 months to pay for a semester of school. If the interest is ​$30.94, find the monthly payment ​(Round to the nearest​ cent.)

Answers

Total amount repayment=amount borrowed+interest

Total amount repayment
1,500+30.94=1,530.94

Monthly payment
1,530.94÷3 months=510.31...answer

Hope it helps!

Answer:

Hence, the monthly payment to the nearest cent is 510.31

Step-by-step explanation:

Consider the provided information,

A college student borrow ​$1,500 for 3 months to pay for a semester of school.

Let us consider the monthly payment is $x.

If he pay $x for next 3 months, then the total amount student paid in 3 month is: 3x

The interest is ​$30.94 for 3 months.

Student pay all the borrowed money and interest in 3 months.

That means he pay $1,500 + $30.94 in 3 months while the monthly payment was 3x.

This can be written as:

[tex]3x = 1500+30.94[/tex]

[tex]3x = 1530.94[/tex]

[tex]x = \frac{1530.94}{3}[/tex]

[tex]x = 510.31[/tex]

Hence, the monthly payment to the nearest cent is 510.31

in slope intercept form, what is the equation of the line passing through the points (3,17) and (7, 25)

A. y=-2x+23
B. y=2x+11
C. y=-3x+26
D. y=2x-11

Answers

Answer:

B

Step-by-step explanation:

To write the equation of the line, use the slope formula to find the slope. Then substitute the slope and a point into the point slope form. Simplify using the distributive property to write in slope intercept form.

[tex]m = \frac{y_2-y_1}{x_2-x_1} = \frac{25 - 17}{7-3} = \frac{8}{4} = 2[/tex]

Using the point slope form of a line equation, substitute m = 2 and the point (3,17).

[tex]y - y_1 = m(x-x_1)\\y -17 = 2(x - 3)\\y - 17 = 2x - 6 \\ y = 2x - 6 + 17 \\ y = 2x + 11 [/tex]

evaluate -x+y+6 for x=-3 and y=-1

Answers

-x + y + 6

-(-3) + (-1) + 6= 

3 - 1 + 6= 

2 + 6= 8 
-x+y+6; x=-3 and y=-1
Sub in the numbers: 
-(-3)+(-1)+6
Simplify:
3-1+6
Combine:
2+6
8 :)

The number 3.453 has two 3s why does each 3 have a different value

Answers

Because they're in different places the 3 in the ones place couldn't equal as much as the three in the thousands place those places make them have different values

evaluate the expression of 8+(-1)+(-3)

Answers

8+(-1)+(-3)=4 There you go

Dr. Hong prescribed 0.019 liter more medicine than Dr. Tannenbaum. Dr. Evans prescribed 0.02 less than Dr. Hong. Who prescribed the most medicine. Who prescribed the least

Answers

Who prescribed the most medicine?

It would be Dr. Hong. This is because Dr. Hong has prescribed more than Dr.Tannenbaum and Dr.Evans.

Who prescribed the least?

It would be Dr.Evans. Because he has prescribed 0.02 less than Dr.Hong and 0.01 less than Dr.Tannenbaum.

Dr. Hong prescribed most medicine and Dr. Evan prescribed less medicine among all other doctors.

Further explanation:

Given:

Dr. Hong prescribed 0.019 liter more medicine than Dr. Tannenbaum.

Dr. Evans prescribed 0.02 liter less than Dr. Hong.

Calculation:

Consider Dr. Tannenbaum prescribed x liter medicine.

It is given that the Dr. Hong prescribed 0.019 liter more than the Dr. Tannenbaum.

Therefore Dr. Hong prescribed [tex]x+0.019{\text{liter}}[/tex] medicine.

It is also given that the Dr. Evans prescribed 0.02 liter less than Dr. Hong.

Therefore, Dr. Evans prescribed [tex]\left({x+0.019-0.02}\right){\text{liter}}[/tex] medicine.

So the Dr. Evans prescribed exactly [tex]\left({x-0.001}\right){\text{liter}}[/tex].

Therefore the medicine prescribed by Dr. Hong is [tex]\left({x+0.019}\right){\text{liter}}\\[/tex].

The medicine prescribed by Dr. Tannenbaum is x liters.

The medicine prescribed by Dr. Evans is [tex]\left({x-0.001}\right){\text{liter}}[/tex].

Arrange all doctors in ascending order with their prescribed medicine.

Dr. Hong > Dr. Tannenbaum > Dr. Evans

So it is obtained from the above expression that the Dr. Evans prescribed less medicine and Dr. Hong prescribed most medicine than other doctor.

Thus, Dr. Hong prescribed most medicine and Dr. Evans prescribed less medicine among all other doctors.

Learn more:

1. What is the value of the digit 4 in the number 84 230 https://brainly.com/question/106975

2. 10 times as many as blank hundreds is 60 hundreds or blank thousands https://brainly.com/question/4805611

Answer details:

Grade: Middle school

Subject: Mathematics

Chapter: Algebraic expression

Keywords:

Dr. Hong, Dr. Tannenbaum, Dr. Evans, medicine, Doctor, prescribed, less, more, liter.

Can someone PLEASE help me with this? ^^^ (25 points)

Answers

Two angles who sum is 180 degrees: Supplementary Angles

Two angles who sum is 90 degrees: Complementary Angles

Pair of angles directly opposite of each other formed by the intersection of straight lines: Vertical Angles

Pair of angles immediately next to each other with one side in common: Adjacent Angles

Mt. Everest, the highest elevation in Asia, is 29,028 feet above sea level. The Dead Sea, the lowest elevation, is 1,312 feet below sea level. What is the difference between these two elevations?

Answers

29,028 - 1312 = 27716 is the difference between elevations .

A union charges monthly dues of $6.00 plus $0.15 for each hour worked during the month.A union member's due for march were $33.00.How many hours did the union member work during the month of march?

Answers

Sent you a picture of the solution.

What Is 1,270 rounded to the nearest hundred?

Answers

It would be 1,300. When rounding, you'd need to look at the number to the right of the place you're rounding to. In this case, you're rounding to the hundreds place (the 2), so you look at the number to the right (7). To know if you round up or down use this:

Round down= 0-4
Round up= 5-9

A rectangle's width is one-fifth it's length, and it's perimeter is 180m. Find the dimensions of the rectangle. The length is M and the width is m

Answers

The dimension of the rectangle will be 15 meters (width) and 75 meters (length).

What is the perimeter of the rectangle?

The sum of all the sides of the rectangle will be known as the perimeter of the rectangle. Let L be the length and W be the width of the rectangle.

Then the perimeter of the rectangle will be

Perimeter of the rectangle = 2(L + W) units

The length is M and the width is m. A rectangle's width is one-fifth its length, and its perimeter is 180 metes. Then the equation will be

m = (1/5)M

m = M/5

M = 5m

Then the perimeter of the rectangle will be

P = 2(m + M)

180 = 2(m + 5m)

90 = 6m

m = 15 meters

Then the length of the rectangle will be

M = 5m

M = 15 x 5

M = 75 meters

The dimension of the rectangle will be 15 meters (width) and 75 meters (length).

More about the perimeter of the rectangle link is given below.

https://brainly.com/question/15287805

#SPJ2

What is the volume of a frustum of a right pyramid with the area of the lower base equal to 100 square inches, the area of the upper base equal to 25 square inches, and the altitude equal to 12 inches?
A. 560 in^3
B. 700 in^3
C. 420 in^3
D. 750 in^3

Answers

Where B₁ and B₂ are the areas of the bases, the volume of the frustum is given by

... V = (1/3)(B₁ +B₂ +√(B₁B₂))h

For your dimensions, the volume is

... V = (1/3)(100 + 25 + √(100·25))·12 = (1/3)·175·12 = 700

The appropriate choice for the volume of the frustum is

... B. 700 in³

find two consecutive integers such that the larger is nine more than twice the smaller

Answers

If x is one integer and x+1 is the next, we have 2*x+9=x+1. Subtracting 9 and x from both sides, we get x(the smaller number)=-8 and the larger number is -7. 

Two consecutive integers are - 7 and - 8.

Here,

We have to find the two consecutive integers.

What are Integers?

An integer is a number which includes negative and positive numbers, including zero.

Now,

Let the smaller number is x.

Then, the larger is nine more than twice the smaller.

So, Larger number = 2x + 9

Since, The difference of two consecutive number are always 1.

So,

2x + 9 - x = 1

x + 9 = 1

x = -8

Therefore, The larger number = 2x + 9 = 2*-8 + 9 = -16 + 9 = -7

Hence,

Two consecutive integers are - 7 and - 8.

Learn more about the integers visit:

https://brainly.com/question/24653557

#SPJ2

Determine whether the equation defines y as a function of x. y equals = 8 Over x Does the equation define y as a function of​ x?

Answers

Sent a picture of the solution to the problem (s).

Yes, the equation defines y as a function of x.

Yes, the equation defines y as a function of x.

A function is a relation where each input x corresponds to exactly one output y. In this equation, y is defined as 8 over x. For any given value of x, the equation will give us a unique value for y. For example, if we plug in x = 2, y = 8/2 = 4. If we plug in x = 4, y = 8/4 = 2.

Thus, this equation defines y as a function of x.

Learn more about Function Definition here:

https://brainly.com/question/34184097

#SPJ3

area of rectangular window is 360 square centimeters if the length of the window is bigger than the width of the window by 4 centimeters what are the dimensions

Answers

The area of a rectangle has a formula of

A = LW
where L is the length and W is the width of the rectangle. Since it is mentioned in the problem that the length is bigger than the width by 4 cm,

L = 4 + W
Substituting this to the area formula:
360 cm² = (4 + W)(W)
Solving for W,
W = 17.08,-21.08

Since it is a quadratic formula, there are two roots. We use the positive root as the answer. So, W = 17.08 cm. Then,
L = 4 + 17.08 = 21.08 cm

Thus, the dimensions of the rectangle are 21.08 cm long and 17.08 cm wide.

Which answer is a reasonable estimate to the following problem? 94 · 689

60,000
70,000
600,000
700,000

Answers

Final answer:

The reasonable estimate for multiplying 94 by 689 is found by rounding the numbers to the nearest convenient figures, which gives an estimated result of 70,000.

Explanation:

To estimate the product of 94 and 689, you can round each number to its nearest simple form and then multiply. Round 94 to 100 because it is close to that multiple of ten. Round 689 to 700, as it is close to this hundred mark. When you multiply 100 by 700, you get 70,000.

This process of rounding to the nearest convenient number simplifies the multiplication and gives us an answer that is easy to calculate and understand. Hence, by rounding the numbers before multiplying, the reasonable estimate for the problem 94 · 689 is 70,000.

Final answer:

By rounding the numbers and multiplying, a reasonable estimate for the product of 94 and 689 is 70,000.

Explanation:

To estimate the product of 94 · 689, we can round the numbers to the nearest ten or hundred and then multiply. For estimation purposes, we can approximate 94 to 100 (since it's closer to 100 than 90) and 689 to 700 (since it's closer to 700 than 600).

Multiplying these rounded figures: 100 × 700 equals 70,000. Therefore, 70,000 is a reasonable estimate for the product of 94 and 689.

What is the area of a circle 3.102 cm in diameter? (note: the units will be cm2, you only need to enter the number)?

Answers

Area of a circle = pi*r^2, where r is the radius.

r = diameter/2
= 3.102/2
= 1.551

A = pi*1.551^2
= 7.557 cm^2

Area of a circle is pi radius square
diameter= 3.102
radius=diameter/2=3.102/2=1.551
A=3.14 (1.551)^2=7.554cm^2

a 25-foot wire is to be cut so that the longer piece is one foot longer than 5 times the shorter peice . find the length of each peice

Answers

short piece = x

 long piece = 5x +1

x +5x +1 = 25

6x = 24

x = 24/6 = 4

 short piece = 4 feet

long piece = 21 feet

25 = L + S where L is longer piece and S is shorter piece
L = 5S + 1
Then 25 = 5S + 1 + S
         25 = 6S + 1
         24 = 6S
           S = 4
           L = 21

Emily brought $35 to the fair. at the fair, she spent $16 on ride tickets and she also bought lunch. she had $7 when she left the fair. how much did emily spend on lunch?


A. 23 + x =35
x=12

B. 16 + x =35
x = 19


C. x - 23 = 35
x = 58

D. x + 9 = 35
x= 26

Answers

Answer:

the answer is A

Step-by-step explanation:

first you have to add 16+7 which is 23, then subtract 23 from 35 and you get 12, she spent 12 dollars on lunch.

Two-thirds a number plus 4 is 7

Answers

The answer is 2/3n+4=7

Compute, in centimeters and in meters, the height of a basketball player who is 6 ft 6 in. tall.

Answers

Centimeters - 201.168
Meter - 2.01168

Answer:

Height in cm =198.12 cm

Height in m =1.9812 m

Step-by-step explanation:

To make this conversion we have to get the conversion rate from feet and inches to centimeters.

Each feet is 30.48 cm. And each inch is 2.54 cm This is the rate of conversion.

So, to get the height of the basketball player we have to multiply the  height in feet and inches by the rate.

6 ft x 30.48 cm= 182.88 cm

6 in x 2.54 cm= 15.24 cm

Adding both,  height in cm =198.12 cm

Rate of conversion cm to m= 100 cm are a meter

We divide the height in cm by 100 to get the height in m

Height in m =1.9812 m

the product of two numbers is 14. One of the numbers is d. What expression represents the other number

Answers

Write out in math symbols the info given you here:  if the product of d and x is 14, then x = 14/d.
Other Questions
Naturally occurring copper is 69.15% copper-63 (atomic mass = 62.93 amu) and 30.85% of some other isotopic form of copper. what must the atomic mass of this second isotope be in order to account for the 63.55 amu average atomic mass of copper? (write the answer to two decimal places.) This term refers to a group of German-born Georgia colonists who settled in present-day Effingham County on the Georgia coast. _____ is a manager who helps directs the activities of a whole channel and tries to avoid or solve channel conflicts. The circle below represents a whole, or 1.use subtraction to determine the unknown part of the circle. A carpenter is building a rectangular bookcase with diagonal braces across the back, as shown. The carpenter knows that ADC is a right angle and that mBDC is 32 greater than mADB. Write and solve an equation to find mBDC and mADB Compare and contrast the approaches of Chandragupta and Asoka to ruling the Mauryan empire.Can someone help? If I increase an amount by 7% what is the multiplier Explain why early American settlers were persuaded by Edwards's sermon "In the Hands of an Angry God". Although growth rate is variable among types of bacteria the growth of bacteria is dependent on Find the value of x for which p is parallel to q, if m1 = (4x) and m3 = 100. The diagram is not to scale.a. 96b. 25c. 104d. 100 What common angle do CDG AND FCE share? FBG is congruent to DBE CEF is congruent to CGD CDG is congruent to CFE GCE is congruent to ECG What volume (in milliliters) of oxygen gas is required to react with 4.03 g of Mg at STP Where are Paris's industrial areas located? The legs of a scalene triangle are represented by (x + 4), (x + 8), and ( 2x 3). Which polynomial expression BEST represents the perimeter of the triangle? Which sentence correctly uses a pronoun in the nominative case as a subject? How long did the attack on pearl harbor last? 1. Four more than five times a number is less than 54. Evaluate this problem situation for values of the number.2. Two times the sum of a number and four increased by three is at most six less than the number. Evaluate this problem of situation for values of the number. A 0.100-g sample of your favorite candy is burned in a calorimeter that contains 1.00 kg of water initially at 21.0 C. After the candy is burned, the water temperature is 34.5 C. How many Calories are there per gram of your candy? Find the value of k so that the equation has the solution set {-3} 3(2x-1) = x(2-k) How did the french and indian war lead to problems between the colonies and great britain? Steam Workshop Downloader