#include <string.h>
void main()
{
char a[] = "hello"
char b[100]
memset(b, 0, sizeof(b))
strcpy(b, a)
strcat(b, "world!")
printf("%s\n", b)
}
5个函数,余猜滚竖余memset,sizeof,strcpy,strcat,printf,个个常兆烂用。
#include <stdio.h>#include <math.h>void main() { float xdouble yprintf("Please input the value of x:")scanf("%f",&x)if(x>=-10&&x<=4) { y=fabs(x-2)printf("y=%.2f\n",y)} else if(x>=5&&x<=7) { y=x+10printf("y=%.2f\搜橘n",y)} else if(x>=8&&x<=12) { y=pow(x,4)printf("y=%.2f\n",y)} else printf("No answer\腔漏桥n")}采纳伍猛哦
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)