#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

Protected

Protected by Copyscape
 
Learn Programming © 2017. All Rights Reserved. Shared by S.A.R
Top