[美]K.N.King 著 吕秀锋 黄倩 译
printf("Value of z: %g\n", z);
return 0;
}
When compiled using GCC and then executed, this program produced the following output:
Value of i: 5618848
Value of j: 0
Value of k: 6844404
Value of x: 3.98979e-34
Value of y: 9.59105e-39
Value of z: 9.59105e-39
The values printed depend on many factors, so the chance that you'll get exactly these numbers is small.
5. [was #10] (a) is not legal because 100_bottles begins with a digit.
8. [was #12] There are 14 tokens: a, =, (, 3, *, q, -, p, *, p, ), /, 3, and ;.
Answers to Selected Programming Projects
4. [was #8; modified]
#include <stdio.h>
int main(void)
{
float original_amount, amount_with_tax;
printf("Enter an amount: ");
scanf("%f", &original_amount);
amount_with_tax = original_amount * 1.05f;
printf("With tax added: $%.2f\n", amount_with_tax);
return 0;
}
The amount_with_tax variable is unnecessary. If we remove it, the program is slightly shorter:
#include <stdio.h>
C语言程序设计现代方法 2页 免费c语言程序设计:...PP181第第8行、第3个问题答案的第一段代码第一行和第2段代码第一行各多了...
C语言程序设计(第二版)习题参考答案1_初一数学_数学_初中教育_教育专区。C 语言程序设计习题参考答案习 题 1 一、判断题 1.在计算机中,小数点和正负号都有...
谭浩强--C语言程序设计(第二版)习题答案_IT/计算机_专业资料。C 语言程序设计(第 2 版)课后习题答案第一章 1.请参照本章例题,编写一个 C 程序,输出以下...
《C语言程序设计教程(第二版)》习题答案_理学_高等教育_教育专区。C语言程序设计课后答案1【C 语言】 语言程序设计教程(第二版)》习题答案 《C 说明 1. 本...
《C语言程序设计教程(第二版)》习题答案_工学_高等教育_教育专区。2 第 1 章 程序设计基础知识 一、单项选择题(第 23 页) 1-4.CBBC 5-8.DACA 二、...
c语言程序设计现代方法(第... 83页 2财富值 C语言程序设计杜友福版本课..... C 语言程序设计习题答案习题一 C 语言程序设计概述一、名词解释 (1)程序 P1...
c语言程序设计现代方法(第... 83页 2财富值 谭浩强--C语言程序设计(第... 49页 5财富值 C语言程序设计习题参考答案... 40页 2财富值 《C语言程序设计...
C语言程序设计(何欣铭、颜晖 第2版)课后习题答案_工学_高等教育_教育专区。C语言程序设计(何欣铭、颜晖 第2版)课后习题答案39 C语言程序的调试、运行步骤编辑...
《C语言程序设计教程(第二版)》 习题答案 李凤霞主编、北京理 工大学出版社_工学_高等教育_教育专区。教材习题答案 习题 单项选择题 1. C 2. B 3. B4....
C语言程序设计(第二版)课后答案 丁亚涛_理学_高等教育_教育专区。C程序设计答案(第二版)丁亚涛习题二一、选择题题号 答案 1 C 2 B 3 A 4 C 5 A 6 ...
热门文档