C语言 指针解决问题 练手
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){ int n=0 ,x=0 ,record=1 ; int a[10500]={0} ; ……
查找特定的值(C语言版)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,x,k; int flag=0; int arr[10001]; scanf……
查找特定的值(C语言)
摘要:解题思路: 循环查找数组里的值,一旦找到立马跳出循环注意事项: 注意输出-1参考代码:#include<stdio.h>
int main()
{
int a,n;
scanf……
2901: 查找特定的值(C语言)
摘要: #include
#include
int main()
{
int n;
scanf("%d",&n);
int a[n+1];
for(int i=1……
2901:查找特定的值——遍历
摘要:解题思路: 给了n个数,需要从中找值为x的数的下标。 因此可以设定一个数组a,用来存放这n个数。 然后遍历数组a,寻找某个下标k,使得 a[k……
2901: 查找特定的值
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m; scanf("%d",&n);//输入 int arr[10001]={0}……