Home > database >  notes
notes

Time:10-03

# include "stdio.h" void main () {int a [10]={9,4,65,67,7,2,4}; Int t=0; int i; Int x; The scanf (" % d ", & amp; x); for(i=0; i<10; I++) {if (x==a [I]) {t++; Chuxian le}} printf (" % d % d ci ", x, t); for(i=0; i<10; I++) {printf (" % d \ n ", a [I]); } printf (" over "); Update update#}//array elements include "stdio.h" void main () {int a [10]={9,4,65,67,7,2,4}; int i; int x,y; Int flag=0;//sign variables, says it found no x the scanf (" % d % d ", & amp; X, & amp; Y); for(i=0; i<10; I++) {if (x==a [I]) {a, [I]=y. flag=1; }} the if (flag==0) {printf (" not found "); } else {for (I=0; i<10; I++) {printf (" % d \ n ", a [I]); }} printf (" over "); } # include "stdio.h" void main () {int a [10]={9,4,65,4,7,2,4}; int i,j; Int x; Int size=7;//the number of the current element in an array, according to delete, constantly change int flag=0;//sign variables, says it found no x the scanf (" % d ", & amp; x); for(i=0; i