TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mngaro Mwazenje
NA
80
13.2k
print array stars
Mar 7 2020 3:31 AM
Complete the method public static void PrintArrayInStars(int[] array) in the template to make it print a row of stars for each number in the array. The amount of stars on each row is defined by the corresponding number in the array.
You can try out the printing with this example:
int[] array = {5, 1, 3, 4, 2}; PrintArrayInStars(array);
using
System;
using
System.Collections.Generic;
namespace
exercise_82
{
class
Program
{
public
static
void
Main(
string
[] args)
{
// You can test your method here
int
[] array = { 5, 1, 3, 4, 2 };
PrintArrayInStars(array);
}
public
static
void
PrintArrayInStars(
int
[] array)
{
int
i = 0;
while
(i < array)
{
Console.Write(
"*"
);
i++;
}
}
}
}
Reply
Answers (
1
)
WinForms Combobox Drop Down on Enter and on Click
Console.Backgroundcolor and para.Range.Shading.Background