一个人做网站赚钱,网络安全未来发展趋势,wordpress七牛云使用,怎样推广一个产品改错题1、在考生文件夹下#xff0c;给定程序MODI.C的功能是#xff1a;从低位开始取出长整型变量s中奇数位上的数#xff0c;依次构成一个新数放在t中。例如#xff0c;当s中的数为#xff1a;7654321时#xff0c;t中的数为#xff1a;7531。请修改并运行该程序#…改错题1、在考生文件夹下给定程序MODI.C的功能是从低位开始取出长整型变量s中奇数位上的数依次构成一个新数放在t中。例如当s中的数为7654321时t中的数为7531。请修改并运行该程序然后将源程序文件MODI.C上传。#include #include main( ){ long s, t, sl10;clrscr();printf(\nPlease enter s:);scanf(%ld, s);/************found************/t s / 10; s%10 改为 ts%10while ( s 0){ s s/100;t s%10 * sl t;/************found************/sl sl*100 ;改为 S1S1*10;}printf(The result is: %ld\n, t);}2、在考生文件夹下给定程序MODI.C的功能是求一维数组a中的值为偶数的元素之和。例如当一维数组a中的元素为10,4,2,7,3,12,5,34,5,9 程序的输出应为The result is: 62#include #include main(){ int a[10]{10,4,2,7,3,12,5,34,5,9},i,s;clrscr();s 0;for ( i0; i10; i)/************found************/if (i % 2 0) 改为if (a[i] % 2 0)s s a[i];/************found************/print(The result is: %d\n, s);}3、在考生文件夹下给定程序MODI.C的功能是求一维数组a中值为偶数的元素之和。例如当一维数组a中的元素为10,4,2,7,3,12,5,34,5,9 程序的输出应为The result is: 62。#include #include sum ( int arr[ ],int n ){ int i,s;clrscr();s 0;for ( i0; iif (arr[i] % 2 0)/************found************/s s i; 改为s s [i];return (s);}main(){ int a[10]{10,4,2,7,3,12,5,34,5,9},i,s;/************found************/s sum( a ,2 ); 改为s sum( a ,10);printf(The result is: %d\n, s);}4、在考生文件夹下给定程序MODI.C的功能是求二维数组a中的最大值。例如当二维数组a中的元素为4 4 347 3 125 6 5程序的输出应为The max is: 34 。#include #include main(){ int a[3][3]{4,4,34,7,3,12,5,6,5},i,j,max;clrscr();max a[0][0];for ( i0; i3; i)for ( j0; j3; j)/************found************/if (max a[i][j]){/************found************/max a[i][j];}printf(The max is: %d\n, max);}5、在考生文件夹下给定程序MODI.C的功能是求一维数组a中的最大元素及其下标。例如当一维数组a中的元素为1,4,2,7,3,12,5,34,5,9程序的输出应为The max is: 34,pos is: 7 。#include #include main(){ int a[10]{1,4,2,7,3,12,5,34,5,9},i,max,pos;clrscr();max a[0];