Ask Question

Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a newline character) where N is the value of the argument received. Write a statement that invokes printStars to make a line of 35 stars.

+4
Answers (1)
  1. 11 July, 05:35
    0
    printStars (35);

    Explanation:

    public class Question {

    public static void main (String args[]) {

    printStars (35);

    }

    public static void printStars (int numberOfStars) {

    for (int i = 1; i < = numberOfStars; i++) {

    System. out. print ("*");

    }

    System. out. print ("/n");

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that printStars is a function that takes one argument and returns no value. It prints a line of N stars (followed by a newline ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers