Skip to content

Create c#_new#3

Open
Rohit484 wants to merge 1 commit intodotQuestionmark:masterfrom
Rohit484:master
Open

Create c#_new#3
Rohit484 wants to merge 1 commit intodotQuestionmark:masterfrom
Rohit484:master

Conversation

@Rohit484
Copy link

@Rohit484 Rohit484 commented Nov 7, 2020

int[] numbers = { 4, 8, 15, 16, 23, 42 };
foreach (int number in numbers)
{
int total;
total += number;
if (number == 42)
{
bool found = true;
}
}
if (found)
{
Console.WriteLine("Set contains 42");
}
Console.WriteLine($"Total: {total}");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant