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
lara31 [8.8K]
1 year ago
12

write (define) a public static method named countup, that takes one int argument and returns no value. you can safely assume tha

t the argument will always be a positive integer. when this method is called, it should print a count from 1 up to (and including) the argument value.
Computers and Technology
1 answer:
tester [92]1 year ago
7 0

Using the knowledge of computational language in python it is possible to write a code that write (define) a public static method named countup, that takes one int argument and returns no value.

<h3>Writting the code:</h3>

<em>public class </em><em>Main</em>

<em>{</em>

<em>public static void main(</em><em>String</em><em>[] args) {</em>

<em>// testing the method </em><em>countDown </em><em>with values 5, 6, 1</em>

<em>countDown(5);</em>

<em>System.out.println();</em>

<em>countDown(6);</em>

<em>System.out.println();</em>

<em>countDown(2);</em>

<em>System.out.println();</em>

<em>}</em>

<em />

<em>public static void </em><em>countDown</em><em>(int num)</em>

<em>{</em>

<em>for (int i=1 ; i<=num ; i++) // for </em><em>loop </em><em>iterates from 1 to num</em>

<em>{</em>

<em>System.out.print(i+","); // prints num followed by comma ,</em>

<em>}</em>

<em>}</em>

<em>}</em>

See more about JAVA at brainly.com/question/12975450

#SPJ1

You might be interested in
You have been tasked with designing an Ethernet network. Your client needs to implement a very high-speed network backbone betwe
Vsevolod [243]

Answer:

a.10GBaseSR

d.1000BaseSX

Explanation:

In Computer Networking, The 1000BaseSX is a type of cabling standard used for deploying Gigabit Ethernet networks. The SX in 1000BaseSX denotes short, and it implies that it's for use with transmissions having short-wavelength over short runs of fiberoptic cabling in a Gigabit Ethernet networks.

The SR in 10GBaseSR denotes short-range, it is exclusively used for multi-mode fiberoptic medium that uses 850nm lasers having LC duplex connector and DDM with a maximum transmission distance of 300meters in a Gigabit Ethernet networks.

5 0
3 years ago
How many times is the body of the loop executed?
Flura [38]

Answer:

The loop will run 5 times.

3 0
2 years ago
What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float? a double??
Elena L [17]
The <span>magnitude of the largest positive value you can place in a bool, a char, an int, a float, a double are as follows:

</span><span>Int: 4 bytes Float: 4 double: 8 char: 1 boolean: 1
</span>
I hope my answer has come to your help. God bless and have a nice day ahead!
8 0
3 years ago
What is one invention that has had an impact on the way you live?<br><br>Write an essay
xz_007 [3.2K]
My phone duhhh. If I hadn’t had a phone I wouldn’t be able to send streaks...
8 0
3 years ago
Read 2 more answers
I am trying to write a c++ program like the game typeracer. When the player starts the program he will be asked to write a sente
murzikaleks [220]
Http://www.cprogramming.com/tutorial/string.html

--------------------------------------------------------------------
6 0
3 years ago
Other questions:
  • Marie uses a browser to visit a blog. What is the unique identifier of the blog? A. web page B. website C. web address D. email
    7·2 answers
  • Fullsoft, Inc. is a software development company based in New York City. Fullsoft’s software product development code is kept co
    10·1 answer
  • In an airline reservation system, on entering the flight number, the flight schedule and the flight status are displayed. In thi
    13·2 answers
  • Sam has installed a new CPU in a client’s computer, but nothing happens when he pushes the power button on the case. The LED on
    14·1 answer
  • Odbc works on the ____ operating system.
    5·1 answer
  • Nvm, Its B.
    10·1 answer
  • With arbitrary code execution, the ________________ launches ("spawns") a command shell from which instructions can then be issu
    11·1 answer
  • Which of the following are examples of jobs in the allied health profession? select all that apply.
    8·1 answer
  • Please answer this simple (hard) question for me lol
    13·2 answers
  • How to enter date in a Date/Time field?​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!