English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Help me with this question:

Given an int variable k that has already been declared, use a for loop to print a single line consisting of 97 asterisks. Use no variables other than k

what does asterisks mean? thanks

2006-09-21 09:41:29 · 2 answers · asked by ? 1 in Computers & Internet Programming & Design

please give me the answer to this

2006-09-21 10:03:51 · update #1

2 answers

an asterisk is the * character (usually above the 8 on standard keyboards).

2006-09-21 09:44:09 · answer #1 · answered by John J 6 · 2 0

public class StarLine {
public static void main(String args[]) {
int k;
for(k=0; k<97; k++)
System.out.print("*");
}
}

Copy above code, paste into a notepad and save it with the name 'StarLine.java'. Compile and run.

2006-09-21 10:21:58 · answer #2 · answered by SmartSpider 4 · 1 0

fedest.com, questions and answers