using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
int[] ints = { 0, 10, 100, 1000, 1000000 };
string i =Console.ReadLine();
int num = int.Parse(i);
foreach (int arr in i)
{
Console.WriteLine(arr);
}
}
}
}
Using the for each loop i want to search an element in an array please help me. Thanks in advance.
Manoj BhoirRank #599 · 4K reputationPosted Jun 9, 2015, 5:36 AM EDT
Michal HabalcikRank #902 · 2.3K reputationPosted Jun 9, 2015, 4:45 AM EDT
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 9, 2015, 5:54 AM EDT
Inathi Gqola83 reputationPosted Jun 9, 2015, 6:08 AM EDT
Pradeep ShetRank #595 · 4K reputationPosted Jun 9, 2015, 9:41 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 9, 2015, 8:13 PM EDT
Micheal John25 reputationPosted Jun 9, 2015, 10:52 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts