![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c primer plus
神奇的欧拉
计算机小白,努力ing
展开
-
C primer plus第六版 第十章答案
//10.1#include<stdio.h>#define MONTHS 12#define YEARS 5int main(void){ const float rain[YEARS][MONTHS] = { { 4.3, 4.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 3.5, 6.6 }...原创 2020-04-10 17:08:16 · 509 阅读 · 0 评论 -
C primer plus第六版 第九章答案
//9.1#include<stdio.h>double min( double x, double y ){ return ( x < y ? x : y);}int main(){ double x,y,result; scanf("%lf",&x); scanf("%lf",&y); result = min(x,y); print...原创 2020-04-03 21:30:20 · 434 阅读 · 0 评论 -
C Primer Plus第六版第十章 源码
//10.1#include<stdio.h>#define MONTHS 12int main(void){ int days[MONTHS] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int index; for (index = 0; index < MONTHS; ind...原创 2020-04-03 16:54:58 · 313 阅读 · 0 评论 -
C Primer Plus第六版第九章源码
//9.1#include<stdio.h>#define NAME "GIGATHINK, INC."#define ADDRESS "101 Megabuck Plaza"#define PLACE "Megapolis, CA 94904"#define WIDTH 40void starbar(void);int main(void){ starbar(...原创 2020-04-03 16:46:44 · 324 阅读 · 0 评论 -
C primer plus第六版 第八章答案
//8.1#include<stdio.h>int main(void){ char ch; int count = 0; while ((ch = getchar()) != EOF) count++; printf("%d",count);//重定向符号不算的话就是count -1; return 0;}//8.2#include&l...原创 2020-04-02 07:57:55 · 297 阅读 · 0 评论 -
C Primer Plus第六版第八章字符,输入输出验证 源码
//8.1#include<stdio.h>int main(void){ char ch; while ((ch = getchar()) != '#') putchar(ch); return 0;}//8.2#include<stdio.h>int main(void){ int ch; while ((ch = g...原创 2020-04-01 18:19:49 · 580 阅读 · 0 评论 -
C primer plus第六版 第七章分支跳转 答案
//7.1#include<stdio.h>int main(void){int countspace=0,countendl=0,countothers=0; char ch; ch=getchar();while(ch!='#'){ if(ch==' ') countspace++; else if(ch=='\n') ...原创 2020-03-29 15:53:08 · 490 阅读 · 0 评论 -
C Primer Plus第六版第七章分支和跳转 源码
#include<stdio.h>int main(void){ int count_space = 0; int count_line_break = 0; int count_others = 0; int ch; printf("请输入.\n"); while ((ch = getchar())!= '#') { if (ch == ' ') ...原创 2020-03-27 17:36:17 · 302 阅读 · 0 评论 -
C primer plus(第六版) 第七章 分支和跳转 源码
//7.1#include<stdio.h>int main(void){ const int FREEZING = 0; float temperature; int cold_days = 0; int all_days = 0; printf("Enter the list of daily low temperature.\n"); printf("Us...原创 2020-03-27 14:46:42 · 301 阅读 · 0 评论 -
C primer plus第六版第六章习题答案
习题答案//6.1#include<stdio.h>int main(void){ char name[26]; int i; for(i = 0;i < 26; i++) { name[i] = 'a' + i; printf("%c ",name[i]); } return 0;}//6.2#include<stdio...原创 2020-03-27 11:07:58 · 363 阅读 · 0 评论 -
C Primer Plus第六版第六章循环 源码
源码/* 6.1 */#include<stdio.h>int main(void){ long num; long sum = 0L; int status; printf("Please enter an integer to be summed "); printf("(q to quit): "); status = scanf("%ld",&...原创 2020-03-27 09:50:07 · 457 阅读 · 0 评论 -
C Primer Plus第六版第五章运算符,表达式,语句课后题
//5.1#include<stdio.h>#define MIN 60int main(void){ int min, hour, sec; printf("Please enter minutes.\n"); scanf("%d",&min); while (min > 0) { hour = min / MIN; sec = min ...原创 2020-03-26 20:58:50 · 192 阅读 · 0 评论 -
C Primer Plus第六版第五章运算符,表达式,语句源码
源码//5.1#include<stdio.h>#define ADJUST 7.31int main(void){ const double SCALE = 0.333; double shoe, foot; shoe = 9.0; foot = SCALE * shoe + ADJUST; printf("Shoe size (men's') foo...原创 2020-03-26 18:54:34 · 196 阅读 · 0 评论 -
C Primer Plus第四章课后题
/* 4.1 */#include<stdio.h>int main(void){ char ming[20]; char xing[20]; scanf("%s %s",&ming,&xing); printf("%s %s",ming,xing); return 0;}/* 4.1 */#include<stdio.h...原创 2020-03-26 17:53:59 · 222 阅读 · 0 评论 -
C Primer Plus第四章源码
源码//4.1#include<stdio.h>#include<string.h>#define DENSITY 62.4;int main(void){ float weight,volume; int size, letters; char name[40]; printf("Hi! What's your first name?\n");...原创 2020-03-26 15:10:17 · 483 阅读 · 0 评论 -
C Primer Plus 第六版 源码和课后习题答案(在更新中……)
C Primer Plus个人博客# 纯小白勿喷自己想记录一下系统学一次C语言,顺便分享下。可能将源码和课后题放在一起有点冗长,不过便于察看。第二章.第三章.更新中……...原创 2020-03-25 23:16:55 · 1263 阅读 · 0 评论 -
C Primer Plus第三章源码和课后题
第三章源码/*3.1*/#include<stdio.h>int main(void){ float weight; float value; printf("Are you worth your weight in platinum?\n"); printf("Let's check it out.\n"); printf("Please enter you...原创 2020-03-25 23:03:55 · 1014 阅读 · 0 评论 -
C primer plus 第二章源码和课后题
第一章源码//2.1#include <stdio.h>#include <stdlib.h>int main(){ int num; num=1; printf("I am a simple "); printf("computer.\n"); printf(" My favourite number is %d...原创 2020-03-25 22:04:56 · 321 阅读 · 0 评论