#include <stdio. h>
int fx( int n)
{
int s;
if(n==0)s=0;
else s=n+fx(n-2);
return s;
}
void main()
printf("%d\n", fx(8));
输入一个一维整型数组,输出最大值、最小值和平均值(要求用指向一维字符数组的指针变量来处理数组元素)。
下面程序的功能是输出1000以内能被7整除且个位为5的所有整数。
include<stdio.h>
int i,m;
for(i=1;________;i++)
{m=i*10+5;
if(_______)continue;
printf("%\n",_______);
从键盘输入50个整数,计算并输出大于等于零的数的平均值(保留小数点后两位)
从键盘输入某个职工的工号、姓名和工资保存至结构体类型变量并输出。
#include< stdio.h>
typedef struct employee
int number;
char name[20];
float salary;
}________;
EMP em;
scanf("%d%s%f", &em. number,________,&em.salary);
printf("Number:%d\nName:%s\nSalary:%.1fn",________);
以下程序的功能是从键盘上输入若干个字符(以回车键作为结束)组成一个字符串存入一个字符数组,然后输出该字符数组中的字符串。
#include<stdio.h>
char str[51],*sptr;
int i;
for(i=0;i<50;i++)
str[i]=getchar();
if( str[i] =='\n')________;
str[i]=________;
sptr= str;
while(*sptr)putchar(*sptr________);
#include <stdio.h>
static char a[]="ABCDEFGH",b[]="aBcDeFgH";
char *pl=a, *p2 =b;
while( *p1! ='\0')
if(*p1==*p2)
printf("%c", *p2);
p1++,p2++;
#include< stdio.h>
int sum(int n)/*递归函数*/
if(n==1) return 1;
else return n+ sum(n-1);
printf("sum =%d\n", sum(10));
设int a[2][3]={3,4,5,6,7,8};,则数组元素a[1][0]的值为_______。
for(i=10;i>=1;i--)
if(i<=)break;
printf("%3d",i);
printf("\n");
热门试卷
经济师初级(经济基础知识)模拟试卷5
经济师初级经济基础知识(商品经济的基
经济师(初级)工商管理专业知识与实务
初级经济师试题及答案3(公路运输)
经济师初级人力资源管理专业知识与实务
初级经济师《工商专业》全真模拟试卷(
初级经济师《经济基础知识》考前突破试
订单号:
遇到问题请联系在线客服