write (define) a public static method named countup, that takes one int argument and returns no value. you can safely assume that 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.

Respuesta :

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.

Writting the code:

public class Main

{

public static void main(String[] args) {

// testing the method countDown with values 5, 6, 1

countDown(5);

System.out.println();

countDown(6);

System.out.println();

countDown(2);

System.out.println();

}

public static void countDown(int num)

{

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

{

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

}

}

}

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

#SPJ1

Ver imagen lhmarianateixeira
RELAXING NOICE
Relax