#include<stdio.h>
 
int main()
{
    int r[20],e,s,a;
    printf("Enter array size");
    scanf("%d",&a);
    
    printf("Enter array elements:\n");
    for(e=0;e<a;++e)
        scanf("%d",&r[e]);
    
    printf("\nAny number enter to search:");
    scanf("%d",&s);
    
    for(e=0;e<a;++e)
        if(r[e]==s)
            break;
    
    if(e<a)
    
        printf("Number found at loctation %d",e+1);
    else
        printf("Number not found");
 
    return 0;
}
 
If you face any problem so contact me Thank you Contact :- https://www.facebook.com/Teach.Coding

Post a Comment

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Protected

Protected by Copyscape
 
Learn Programming © 2017. All Rights Reserved. Shared by WpCoderX
Top