Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
lala
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int count=0; int searchnum=Int32.Parse(Console.ReadLine()); int arraylen=Int32.Parse(Console.ReadLine()); int [] array=new int[arraylen]; for(int i=0;i<arraylen;i++) { array[i]= Int32.Parse(Console.ReadLine()); if(array[i]==searchnum) {count++;} } if (count>0) Console.WriteLine("Number Found"); else Console.WriteLine("Number Not Found"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Extract all possible substrings from a string
Delegates, events
line 1 syntax error
Use ConcurrentQueue and ConcurrentDictionary with TPL (Simple example)
Datediff in c#
Bharadwaj maryala
abc
C# Bubble Sort
Interface
Daily Coding Problem: Problem #2
Please log in to post a comment.