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
barxatty [35]
3 years ago
12

Write a main function to do the following: A. Declare an array of 20 strings. B. Create an input file for the file "poem.dat". C

. Read each line of the file into one of the strings in the array. You can assume that there are no more than 20 strings in the file but there may be fewer than 20, so read until end of file. D. Call the function from problem 5 E. for each string you have stored in the array. After each call print the string.
Computers and Technology
1 answer:
elixir [45]3 years ago
6 0

I know you're going to delete my comment but please let it stay.

I have a essay and I need it to be completed and I need to ask a question. If you have a better reason why you need me to explain it, then please reply. IF you can.

Thanks

: )

Read more on Brainly.com - brainly.com/question/15973749#readmore

You might be interested in
What would be the total width of the div in the code below?
Artyom0805 [142]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is d- 346px.

The complete code of this example is given below:

<div>

style="margin:20px; border:solid 3px #888888;">

</div>

while the image width is 300px.

It is noted that the image width is 300px and the margin is 20 px.

Margin:20px means that image margin from four side is 20 px each.

So the width of dive from both side increase to 40 px and the image has 300 px, then total width becomes 340px. Now the border also has 3px of four sides of the image, then the width of the border becomes 6px.

so the total width of the div tag is 346 px.

In short, we can calculate the width of tag as below:

total width of div= width of image+ width of margin+ width of border

total width of dive= 300px+40px+6px

total width of div=346px.

4 0
2 years ago
Read 2 more answers
The Polish mathematician Wacław Sierpiński described the pattern in 1915, but it has appeared in Italian art since the 13th cent
soldi70 [24.7K]

Answer:

/ Sierpinski.java

public class Sierpinski {

     // method to find the height of an equilateral triangle with side length =

     // length

     public static double height(double length) {

           // formula= length*sqrt(3)/2

           double h = (length * Math.sqrt(3)) / 2.0;

           return h;

     }

     // method to draw a filled triangle (pointed downwards) with bottom vertex

     // x,y

     public static void filledTriangle(double x, double y, double length) {

           // finding height

           double h = height(length);

           // filling triangle as a polygon

           // passing x, x-length/2, x+length/2 as x coordinates

           // and y, y+h, y+h as y coordinates

           StdDraw.filledPolygon(new double[] { x, x - (length / 2.0),

                       x + (length / 2.0) }, new double[] { y, y + h, y + h });

     }

     // method to draw an n level sierpinski triangle

     public static void sierpinski(int n, double x, double y, double length) {

           // checking if n is above 0 (base condition)

           if (n > 0) {

                 // drawing a filled triangle with x, y as bottom coordinate, length

                 // as side length

                 filledTriangle(x, y, length);

                 // drawing the triangle(s) on the top

                 sierpinski(n - 1, x, y + height(length), length / 2);

                 // drawing the triangle(s) on the left side

                 sierpinski(n - 1, x - (length / 2.0), y, length / 2);

                 // drawing the triangle(s) on the right side

                 sierpinski(n - 1, x + (length / 2.0), y, length / 2);

           }

     }

     public static void main(String[] args) {

           // parsing first command line argument as integer, if you dont provide

           // the value while running the program, this program will cause

           // exception.

           int n = Integer.parseInt(args[0]);

           // length of the outline triangle

           double length = 1;

           // finding height

           double h = height(length);

           // drawing a triangle (pointed upwards) to represent the outline.

           StdDraw.polygon(new double[] { 0, length / 2, length }, new double[] {

                       0, h, 0 });

           // drawing n level sierpinski triangle(s) with length / 2, 0 as x,y

           // coordinates and length / 2 as initial side length

           sierpinski(n, length / 2, 0, length / 2);

     }

}

7 0
3 years ago
Anyone knows the answer for 6.1.4 Happy Birthday! codehs
Neko [114]

cvm is good cvm is great

7 0
2 years ago
What does getfenv() do?
mariarad [96]

Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.

Explanation: What this does it goes thourgh  line of code in a particular order.

This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.

Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.

Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.

5 0
2 years ago
Read 2 more answers
Examples of sound effects that can be used in video games and a cartoon
astraxan [27]
BOOM!, KAPOWW!, X%[email protected]*?!, SLAP, BOING, DING, ZZZZ, etc.
8 0
3 years ago
Other questions:
  • Write any two use of computer in school​
    15·1 answer
  • Jabari is writing a program which prompts a user for a value with a decimal. Which function should he use? float() int() print()
    9·2 answers
  • A byte contains how many bits? Question 3 options:
    13·2 answers
  • What is one reason the number of DUIs has dropped?
    7·1 answer
  • From which type of data storage does the CPU load information for processing during normal operation?
    14·1 answer
  • A computer essentially takes input, processes it, and produces output. Which person developed a machine in the mid-1880s that ac
    6·1 answer
  • Definition: This modern-day country was one of the most advanced ancient civilizations. Human
    8·1 answer
  • List the types of infrared we have
    12·1 answer
  • Any please answer this How much resistance is required to gen-erate 50 mA of current from a 5 volt bat-tery?
    5·1 answer
  • Which web browser was created by Google?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!