C语言模拟题

2026/1/25 2:02:22

y=exp(2*x)+0.6; else if(x==8) y=x-2.5; else

y=(cos(x)+3.8)/(2*x); return y; /**/ }

void main() {

float x; double y; clrscr();

printf(\ scanf(\ y = fun1(x);

printf(\ getch(); } 6、

#include main() {

/**/ int c1,c5; /**/ int c1=1,c5;; for(;c1<=19;c1++)

{ for(c5=1;c5<=9;c5++)

/**/ if c1*10+c5*50=200 /**/ if (c1*10+c5*50==200) printf(\ }

getch(); } 7、

#include void main() {

int max_val(int a[][4],int *row,int *col);

int arr[3][4]={{32,25,17,6},{2,4,61,8},{15,23,9,15}}; int i=0,j=0,max,*row,*col; row=&i; col=&j;

max=max_val(/**/arr/**/,row,col);

printf(\ getch(); }

int max_val(int a[][4],int *row,int *col) {

int i,j,max; max=a[0][0]; *row=0; *col=0;

for(i=0;i<3;i++) for(j=0;j<4;j++) {if(a[i][j]>max)

{/**/max=a[i][j]; /**/ *row=i; *col=j; } }

return(/**/max/**/); } 7、

#include #include char fun(float f)

{

char code;

/**/ float c;

c=(5.0/9)*(f-32); if(c<0)

code=?W?;

else if(c>=0&&c<25) code=?B?;

else if(c>=25&&c<35) code=?O?; else

code=?R?; /**/

return code; }

void main() {

float f; char code;

printf(\ scanf(\ code=fun(f);

printf(\ getch(); } 8、

#include #include main() {

int num1,num2,ans,flag; char op; clrscr();

printf(\

scanf(\ flag=0;

/**/ switch(\ switch(op) {

case '+': ans=num1+num2; break; case '-': ans=num1-num2; break; case '*': ans=num1*num2; break; case '/': ans=num1/num2; break; case '%': ans=num1%num2; break; /**/ else: /**/ default: { printf(\ }

if (!flag) printf(\ getch(); } 9、

#include void main() {

int item,sa,sb; sa=0;sb=0;

printf(\ scanf(\ while(/**/item!=0/**/) {

if(item>0)

/**/sa++;/**/ else sb++;

scanf(\ }

printf(\ getch(); }?? 11、


C语言模拟题.doc 将本文的Word文档下载到电脑
搜索更多关于: C语言模拟题 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219