Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int a[10]={5,1,3,9,2,6,7,8,11,15};
- int x=0;
- int i=0;
- int band=0;
- printf("Ingrese elemento a buscar\n");
- scanf("%d",&x);
- for(i=0; i<10; i++){
- if(a[i]==x){
- printf("se encontro numero\n");
- band=1;
- }
- if(band==0){
- printf("no se encontro numero\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement