Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

\n #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

\n #167

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions csharp-linear-search/csharp-linear-search.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public static void Main()
a[i] = Int32.Parse(s1);
}

Console.WriteLine("Enter Search element\n");
Console.WriteLine("Enter Search element \n");
string s3 = Console.ReadLine();
int x2 = Int32.Parse(s3);
for (int i = 0; i < x; i++)
{
if (a[i] == x2)
{

Console.WriteLine("Search successful");
Console.WriteLine("Search successful \n");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the significance of this change? Console.WriteLine already appends a line break.

Likewise, the earlier change in this PR is simply adding extra whitespace before an existing line break.

Console.WriteLine("Element {0} found at location {1}\n", x2, i + 1);
return;
}
Expand Down