Pascal system . write the program that will calculate the perimeter of a rectangle if its area is A (m²) and one of its sides has a length of B (m). A and B are entered from the keyboard.​

Answers

Answer 1

Answer:

The program in Pascal is as follows:

Program Perimeter;

Uses Crt;

Var

 Length : Real;

 Width : Real;

 Area    : Real;

 Perim : Real;

Begin

 Clrscr;

 Write('Area: ');

 Readln(Area);

 Write('Length : ');

 Readln(Length);

 Width := Area/Length;

 Perim := 2 * (Length + Width);

 Write('Perimeter: ' ,Perim:5:2,'.');

End.

Explanation:

This declares all variables as real

Var

 Length : Real;

 Width : Real;

 Area    : Real;

 Perim : Real;

The program execution begins here

Begin

This clears the screen

 Clrscr;

This prompts the user for Area

 Write('Area: ');

This gets input for Area

 Readln(Area);

This prompts the user for Length

 Write('Length : ');

This gets input for Length

 Readln(Length);

This calculates the width

 Width := Area/Length;

This calculates the perimeter

 Perim := 2 * (Length + Width);

This prints the calculated perimeter

 Write('Perimeter: ' ,Perim:5:2,'.');

This ends the program

End.


Related Questions

In a school 50% of the students are younger than 10, 1/20 are 10 years old and 1/10 are older than 10 but younger than 12, the remaining 70 students are 12 or older. How many students are 10?

Answers

Answer: 10 students

Explanation:

Students younger than 10 = 50%

Students that are 10years old = 1/20 = 1/20 × 100 = 5%

Students that are older than 10 but younger than 12 = 1/10= 1/10 × 100 = 10%

Students that are 12 years or older

= 100% - (50% + 5% + 10%)

= 100% - 65%

= 35%

This means that 35% of the students are 12 years or older and we've been given the number as 70.

Let's say the total number of students is x. Therefore,

35% of x = 70

0.35 × x = 70

0.35x = 70

x = 70/0.35

x = 200

The total number of students is 200.

Therefore, the number of students that are 10years will be:

= 1/20 × 200

= 10 students

Therefore, 10 students are 10 years.

Other Questions
Can a state use its laws against trespassing as a means to arrest illegal aliens? will mark brainliest What are the characteristics of acids and bases, and some examples of each? (NEED HELP ASAP) BRAINLIEST NO FAKE ANSWERS1.A scientist is attempting to build a cladogram that shows the evolutionary closeness of three organisms in relation to humans. After doing DNA analysis, they determine that the organisms share the following percentages of DNA:Organism A and humans share 85% of their DNA.Organism B and humans share 80% of their DNA.Organism C and humans share 90% of their DNA.Based on this information, which order should they go on the cladogram (from least related to most related)?(1 point)A, B, C, humansC, B, A, humansC, A, B, humansB, A, C, humans2.A cladogram shows the evolutionary relationship between humans, chimpanzees, and gorillas. The cladogram currently shows humans and chimpanzees with a more recent common ancestor compared to gorillas. Which piece of evidence, if true, would most likely weaken this hypothesis?(1 point)Fossils of humans appear in deeper sedimentary rock layers compared to fossils of chimpanzees.Amino acid analysis of the cytochrome c protein shows significant differences in the sequence of amino acids between humans and gorillas.DNA sequence analysis of the hemoglobin alpha gene shows that humans and chimpanzees have a more similar sequence to each other than they do to the gorillas DNA sequence.The cells of the eye in embryos of gorillas and humans follow a similar pattern of development while chimpanzee embryos are different.3.The forelimbs of bats and humans have a very similar bone structure even though they appear very different on the outside. These structures are known as __________ because they result from species evolving __________.Which of the following answer choices correctly completes the above statement?(1 point)homologies; similar adaptations in similar environmentsanalogies; from the same common ancestoranalogies; similar adaptations in similar environmentshomologies; from the same common ancestor4.All vertebrate embryos have a tail and gill slits at some point during embryonic development. What does this suggest about vertebrates?(1 point)The embryos of these species require these structures to survive.These species evolved in similar environments.These species have the exact same DNA sequence.These species share a common ancestor.5.Fossil A is found closer to the surface compared to Fossil B. Which of the following conclusions can be made based on this statement?(1 point)Fossil A is from an older species than Fossil B.The species of Fossil A existed at the same time as the species of Fossil B.The species of Fossil A evolved from the species of Fossil B.Fossil B is most likely older than Fossil A.6.Vertebrate embryos all follow a very similar developmental process. Which statement could explain this similarity?(1 point)All vertebrates require the same nutrients during embryological development.All vertebrates develop a backbone that protects the spinal cord.All vertebrates inherit the same sequence of DNA from their parents.All vertebrates live in similar environments which require the same adaptations.7.Some mutations, or changes in the sequence of DNA, do not have any effect on the characteristics of the organism. Why is this?(1 point)The immune system repairs the mutated sequence during development.The protein built from this mutated sequence is deactivated by the cell.The mutated sequence still codes for the same amino acid.The cell recognizes mutations and ignores them when expressing the gene.8.What is typically studied when analyzing not-yet-born (or unhatched) animals?(1 point)embryological developmentevolutionary theorycausal recordsDNA sequencing9.What can scientists analyze to get a better understanding of how plants and animals evolved from a common ancestor?(1 point)petrified bones and imprints of plantsDNA moleculesvertebrate embryoslife cycles and behaviors10.How can embryos help scientists understand evolution?(1 point)Embryos contain the code for all life on Earth.Embryos go through various stages that suggest the animals evolutionary process.Embryos provide evidence for which life forms existed at the same time.Embryos are frequently fossilized and illustrate change over time.11.Astronomers have made great strides in sending probes out to other planets and moons in our solar system. If they were to find a living creature some place other than Earth, how could DNA analysis help them better understand the organism? Explain in 12 sentences.(2 points)12.In 1973, biologist Theodosius Dobzhansky wrote an essay titled Nothing in Biology Makes Sense Except in the Light of Evolution. Why is evolution so important for understanding biology? Explain your answer in 12 sentences.(2 points)13.You are a scientist tasked with writing a journal article on the evolution of alligators. In 35 sentences, describe the different forms of evidence you might use to analyze the evolution of alligators.(4 points) Many schools have a regular outdoor school one day a week. At Mosby, they often walk 125 meters from the school to the mountain top Jonsberget (140 masl) which is located directly behind the school. How high is the school above sea level? You have 30 minutes to exercise at the gym. The Stairmaster burns 7 calories per minute, while the stationary bike burns 12 calories per minute. You want to burn 290 calories total using both machines. How much time should you spend on each machine? Please help me and show working. I have a test very soon. What can scientists assume about individuals with similar anatomy?I 1What is the solution to the equation 41 7 18 8*3*?X=-5X=-4X=4x=5 The MAIN benefit of the committee system in the Georgia General Assembly is thatAcommittees force members of the majority and minority parties to reachcompromises.B)committees allow members of paid interest groups to influence the designand wording of bills.committees ensure that when bills are presented to the entire House,passage is guaranteed.D)committees save time by reviewing and editing bills before they arepresented to the entire House Sasha sold "c" corndogs for $4 each and "p" bags of popcorn for $3. Sashamade a total of $500. Write the equation that represents this situation. SOMEONE PLEASE HELP !! 2CuCl2 +4KI -> 2 Cul + 4 KCI + 12 Which piece of evidence best supports this claim?"The Women's Army Auxiliary Corps (WAAC),created in May 1942, officially allowed women into theUS Army for the first time.""African Americans have fought in every Americanwar since the country was founded, and even before."O "Then, in 1945, the government announced thepossibility of a draft because of the severe shortage ofnurses.""In the meantime, women - including many AfricanAmerican women - assisted the war effort at home byworking in factories and offices." ASAP Please help:)this worth 100 POINTS!! Re-write the quadratic function below in Standard Formy = 5(x - 5)(x - 4) A ball rolled from Point A to Point B in 18 second at a speed of 14 m/s. IT took another 18 seconds to roll form Pint B to Pint C at a speed of m/s. Find the total distance the ball rolled. Help me with this math function below!! You have set up a circuit that uses one battery to light two bulbs. One of the bulbs burns out, causing the other bulb to turn off. Explain why this happens. PLS HELP DUE IN 50 MINSSS Which of the following actions might be appropriate in urging the local government to establish a pet park? Select allthat apply.e-mail city council memberstalk to friendsask neighbors to sign petitionsbegin building one on vacant landpresent a proposed location What effect has the creation of nation-states in Europe had on todays society?