C语言数组上机实验报告2
C语言程序设计实验报告
实验名称数组学 院机械工程与自动化专业班级机械工程及自动化姓 名孙宏浩学 号任课教师高克宁实验时间2011-11-23
实验目的
实验内容
算法描述流程图
源程序
#include
main()
{
int n,i,a[5]={1,2,3,4,5};
printf("输入字符:\n");
scanf("%d",&n);
for(i=0;i<5;i++)
{
if(a[i]==n)
{printf("位于第%d个\n",i+1);break;}
}
if(i==5)
printf("can not find!\n");
}
测试数据
N=3
N=5
N=8
运行结果
出现问题及解决方法
实验心得
to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements
to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements
to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements