您的位置:首页 > 编程语言

《c primer plus》编程练习回顾-第三章

2015-03-07 15:35 344 查看
3.11 编程练习

1.略

2.

#include<stdio.h>
int main(void)
{
int a;
printf("Please input an ASCII code:");
scanf("%d",&a);
printf("%c\n",a);
return 0;
}


3.

#include<stdio.h>
int main(void)
{
printf("\aStartled by the sudden sound ,Sally shouted,\"By the Great Pumpkin,what was that!\"\n");
return 0;
}


4.

#include<stdio.h>
int main(void)
{
float a;
scanf("%f",&a);
printf("The input is %f or %e",a,a);
return 0;
}


5.

#include<stdio.h>
int main(void)
{
float s;
int year;
printf("Please input your age:");
scanf("%d",&year);
s=year*3.156e7;
printf("%f",s);
return 0;
}


6.略
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: