精品国产一区二区三 , 亚洲综合五月 , 俄罗斯特级高清毛片免费 , 激情福利,久久久日本,欧美一三区,欧美黄色大片久久

試題

計算機二級考試程序設計題

時間:2025-03-28 16:42:25 試題 我要投稿

2016計算機二級考試程序設計題

  試題一

2016計算機二級考試程序設計題

  設計程序:計算多項式a0+a1*sin(x)+a2*sin(x*x)+a3*sin(x*x*x)+……的值,并將其值以格式"%.6f"寫入到考生目錄中Paper子目錄下的新建文件design.dat中。

  #include

  #include

  void main()

  {

  FILE *p;

  int i; float x=2.345,t=1.0,y=0.0;

  float a[10]={1.2,-1.4,-4.0,1.1,2.1,-1.1,3.0,-5.3,6.5,-0.9};

  /

  while(scanf("%d%d",&m,&n),m<0 && n<0);

  // m<0 && n<0-à!(m>0&&n>0&&m>=n)

  for(k=m; k%n!=0;)

  k=k+n; //改為:k=k+m

  printf("%d\n",k);

  }

  試題二

  該程序功能:用冒泡法對10個整數(shù)按升序排序。

  #include

  #define N 10

  void main()

  {

  int i,j,min,temp;

  int a[N]={5,4,3,2,1,9,8,7,6,0};

  printf("\nThe array is:\n");

  for (i=0;i

  printf("]",a[i]);

  //

  for (i=0;i

  {

  for (j=0; j

  if (a[j]>a[j+1]) {

  temp=a[j]; a[j]=a[j+1]; a[j+1]=temp;}

  }

  printf("\nThe sorted numbers: \n");

  for (i=0;i

  printf("]",a[i]);

  printf("\n");

  }

【計算機二級考試程序設計題】相關文章:

計算機等級考試二級VB程序設計題08-14

計算機二級考試VB程序設計選擇題05-25

計算機等級考試二級VB程序設計填空題06-25

計算機二級C++語言程序設計考試精選選擇題08-05

2016年計算機二級考試C語言程序設計真題09-16

計算機二級考試真題12-03

計算機二級《WEB程序設計》專項訓練題10-18

計算機二級《Web程序設計》預測題及答案08-11

計算機二級考試C語言程序設計考試大綱05-17