![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C Primer Plus 程序示例
YWH199861
这个作者很懒,什么都没留下…
展开
-
C PrimerPlus 第五章程序示例
程序清单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) foot length \n"); printf("%10.1f %15.2f inches \n",shoe,foot);原创 2020-06-20 22:58:21 · 360 阅读 · 0 评论 -
C Primer plus 第四章程序示例
程序示例4.1# include <stdio.h># include <string.h># define DENSITY 62.4int main(){ float weight, volume; int size, letters; char name[40]; printf("Hi! What's your first name? \n"); scanf("%s",&name); printf("%s,What's your weight原创 2020-06-20 22:48:05 · 352 阅读 · 0 评论 -
C Primer puls第四章练习程序示例
程序示例4.1# include <stdio.h>int main(void){ char pet1[10]; char pet2[30]; printf("Please input your firstname and secondname \n"); scanf("%s %s",pet1,pet2); printf("%s %s",pet2,pet1); return 0; } 程序示例4.2# include <stdio.h>#原创 2020-06-20 22:39:38 · 226 阅读 · 0 评论 -
C Primer plus第3章练习程序示例
//练习2# include <stdio.h>int main(void){ int n; printf("请输入一个ASCII码值:__\b\b"); scanf("%d",&n); printf("%d所代表的ASCII码是%c",n,n); return 0; } //练习3 # include <stdio.h> int main(void) { printf("\aStartled by the sudden sou原创 2020-06-07 20:40:32 · 247 阅读 · 0 评论 -
C Primer Plus第3章程序示例
//程序清单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 your weight in pounds"); scanf("%f",&weight); value原创 2020-06-07 20:37:06 · 326 阅读 · 0 评论 -
C Primmer Plus 第2章练习程序示例
第2章练习//练习1 # include <stdio.h>int main(void){ printf("Gustav Mahler \n"); printf("Gustav \nMahler \n"); printf("Gustav "); printf("Mahler"); } //练习2 # include <stdio.h> int main(void) { printf("XXX:陕西省咸阳市永寿县"); return 0;原创 2020-06-07 20:19:30 · 630 阅读 · 0 评论 -
C Primer Plus 第2章程序示例
第2章// 程序清单2.1# include <stdio.h>int main(void){ int num; num =1; printf("I am a simple"); printf("computer. \n"); printf("My favorite number is %d because it is first. \n",num); //getchar(); //程序输出在屏幕上一闪而过时添加此行代码 return 0;原创 2020-06-07 20:13:05 · 480 阅读 · 0 评论