Write a program that prints the following line of output 1000 times:
All work and no play makes Jack a dull boy.
You should not write a program that uses 1000 lines of source code; use methods to shorten the program.
(Hint: use methods to shorten the program). Each print statement should only have one line of "All work and no play makes Jack a dull boy". What is the shortest program you can write that will produce the 1000 lines of output, using only the material?
White spaces will be ignored (empty lines, (. ). class header, method headers, etc)
AllWorkNoPlay: Using static methods to shorten the program (no loops allowed)
AllWorkNoPlay

Answers

Answer 1

Answer and Explanation:

Using javascript:

var play;

function AllWorkNoPlay(){

Console.log("All work and no play makes Jack a dull boy");

play++

If(play<=1000){

AllWorkNoPlay()

}

else(

return;

)

}

AllWorkNoPlay()

From the above we have defined a function that uses recursive function to print "All work and no play makes Jack a dull boy" to the console 1000 times and not more than that. We have called the function after that.


Related Questions

what is SEO and SEM?

Answers

Answer:

SEO stands for “search engine optimization.” In simple terms, it means the process of improving your site to increase its visibility for relevant searches.

SEM, or search engine marketing, is the act of using paid strategies to increase search visibility.

A ___________ consists of a large number of network servers used for the storage, processing, management, distribution, and archiving of data, systems, web traffic, services, and enterprise applications.

Answers

Answer:

Data center

Explanation:

A network service provider can be defined as a business firm or company that is saddled with the responsibility of leasing or selling bandwidth, internet services, infrastructure such as cable lines to both large and small internet service providers.

Generally, all network service providers, internet service providers and most business organizations have a dedicated building or space which comprises of a large number of computer systems, security devices, network servers, switches, routers, storage systems, firewalls, and other network associated devices (components) typically used for remote storage, processing, management, distribution, and archiving of large amount of data, systems, web traffic, services, and enterprise applications.

Furthermore, there are four (4) main types of data center and these includes;

I. Managed services data centers.

II. Cloud data centers.

III. Colocation data centers.

IV. Enterprise data centers.

Other Questions
Simplify. x 0 yz -3Simplify. x 0 yz -3 Which statement best describes the situation in the United States after the Holocaust?A. The government faced a backlash from the American people after allowing unrestricted numbers of Jewish refugees to immigrate.B. Jewish immigrants were only allowed to seek asylum in the United States if they converted to Christianity upon arrival.C. Anti-Semitism was so high in the United States that the government forbade any Jewish refugees from immigrating.D. The United States provided some refuge, but discrimination guided the laws and prevented many Jewish refugees from immigrating.E. After learning about the horrors of the Holocaust, the United States welcomed all Jewish refugees with open arms. What is the noun of press? To end the cycles of existence one must practice asceticism, meditation , and strive for moral perfection in the context of ahimsa. The soul then rises up to the top of the universe where it remains forever , motionless and free of suffering Qu teora del conocimiento logra responder de mejor forma el problema del conocimiento me ayudam:( Pls help I will give crown The missing number in the arithmetic sequence 60, 51,33 is:43.41.40.42. A planet has a circumference of approximately 39,750 km. with this circumference, what is it's radius? the radius of the planet is_____ (round to the nearest integer as needed)use the measurement above to determine the length of an arc from the North Pole of the planet to the Equator. kevin ran 6/7 miles and his brother james ran 10 miles. How many miles did the two of them ran. Which point is a good approximation of a turning pointof the graph?0 (-1.5,3)0 (-0.5, -1)0 (0,0)O (1.0) which two are the most similar?A: comets and asteroids B:comets and meteorites C:asteroids and meteoroidsD: asteroids and meteorites Select all of the proportional relationships Which of these sentences is an example of persuasive rhetoric?A:Violence is a factor in the development of chronic diseases, which account for a majority of premature U.S. deaths.B:More than 692,000 young people ages 10 to 24 are treated in emergency departments each year for injuries sustained due to violence.C:Violence disproportionately affects young people and people of color.D:No community--affluent, poor, urban, suburban, or rural--is immune from the devastating effects of youth violence. Based on mrs. hope wells attitude toward the fields it is reasonable to infer that the story takes place Who does Odysseus claim will help Telemachus and him in battle? What was the effect of the Berlin Airlift?1) East Germany and West Germany united.2) The Soviet Union gained control over West Berlin.3) West Berlin remained free from communist control. .4) The United States lost influence in the region. please help asap I will give you 15 points. no links or ill report you WILL MARK BRAINLIEST HELP ASAP!!!!In A Struggle for Better Working Conditions," the mill workers in Lowell tried to make their lives better. Write 3or 4 sentences summarizing how they tried to achieve this goal. Use information from the passage and time lineto support your ideas.Select to begin writing. jJandmsmwmwlsmmelskama NEED HELP!! See picture for question!