diff --git a/exercise2.c b/exercise2.c index bf60d58..b658be8 100644 --- a/exercise2.c +++ b/exercise2.c @@ -1,5 +1,5 @@ //documentation section -/* Exercise 2 - Sequential Search - Unsorted List*/ +/* Exercise 2*/ //pre-processor section #include @@ -10,8 +10,48 @@ //main function section int main(){ //write here your program + int n,a,i,count=0; + printf("Enter the number of elements in the array:\n"); + scanf("%d",&n); + int array[n]; + printf("Enter the numbers in the array:\n"); + for(i=0; i