第三章
2,
#include<stdio.h>
int main(void)
{
char ch;
printf(“please enter a number.\n”);
scanf("%d",&ch);
printf("%d in the ascii is %c.\n",ch,ch);
return(0);
}
4,
#include<stdio.h>
int main(void)
{
float e;
printf(“enter a floating-point value:”);
scanf ("%f",&e);
printf(“fixed-point notation:%f\n”,e);
printf(“exponential notation:%e\n”,e);
printf(“p notation:%a\n”,e);
return 0 ;
}
5,
#include <stdio.h>
int main(void)
{
float e=3.156e7,a;
printf(“please enter your age:”);
scanf("%f",&a);
a=e*a;
printf(“your time in the earth is %f”,a);
return 0;
}
c Primer plus第六版第三章编程答案
最新推荐文章于 2021-01-11 19:31:04 发布