好文档 - 专业文书写作范文服务资料分享网站

c语言习题及答案

天下 分享 时间: 加入收藏 我要投稿 点赞

第一章

1.1

题目内容:

使用printf()在屏幕上输出 hello world! 提示:

#include int main() {

printf(\ return 0; }

输入格式: 无

输出格式:

输出提示信息:\输入样例: 输出样例: hello world!

#include int main() {

printf(\ return 0;

1 / 85下载文档可编辑

}

1.2

在屏幕上输出多行信息(3分) 题目内容:

使用printf()函数在屏幕上输出以下多行信息: hello world! hello hit! hello everyone! 提示:

在printf()函数中转义字符‘\\n’表示换行。 输入格式: 输出格式: 输出提示信息: \ \ \ 输入样例: 输出样例: hello world! hello hit! hello everyone! #include int main() {

2 / 85下载文档可编辑

printf(\ printf(\ printf(\ return 0; }

1.3

计算半圆弧的周长及半圆面积(3分) 题目内容:

编程并输出半径r=5.3的半圆弧的周长及该半圆的面积,的取值为3.14159。要求半径r和必须利用宏常量表示。 输入格式: 无

输出格式:

半圆的面积输出格式: \

半圆弧的周长输出格式: \ 输入样例: 输出样例: Area=44.123632

circumference=16.650427 #include #define PI 3.14159 #define R 5.3 int main() {

3 / 85下载文档可编辑

c语言习题及答案

第一章1.1题目内容:使用printf()在屏幕上输出helloworld!提示:#includeintmain(){printf(\return0;}输入格式:无输出格式:输出提示信息:\输
推荐度:
点击下载文档文档为doc格式
6mo6m0f6u27f2vc1v0ey6gjog0oh7b0067e
领取福利

微信扫码领取福利

微信扫码分享