
牛逼c
rocvfx
Goals determine what you're going to be.
展开
-
第一个牛逼c
#include ;int main (void){ int num ;num = 10;printf ("num=%d\n", num);return 0;} 第一个牛逼c,没加分号,没加花裤衩;没用格式化%d,没用转义符\n,不用\n显示结果后面紧跟着按任意键原创 2016-06-03 23:31:15 · 757 阅读 · 0 评论 -
棋盘游戏实例
#include#includechar matrix[3][3];char check(void);void init_matrix(void);void get_player_move(void);void get_computer_move(void);void disp_matrix(void);int main(void){ char done; print原创 2018-01-27 16:14:58 · 1157 阅读 · 0 评论 -
练习1-12
每行输出一个单词#include#define open 1#define close 0main(){ int c, pitLock; pitLock = close; while ((c = getchar()) != EOF) { if (c == '\t' || c == ' ') { if (pitLock == open) { c原创 2017-07-07 11:09:37 · 263 阅读 · 0 评论 -
1.8
#includemain(){ int c, nl; nl = 0; while ((c = getchar()) != EOF) if (c == '\n') ++nl; printf("%d\n", nl);}#includemain(){ int c, nl; nl = 0; while ((c = getchar()) != EOF)原创 2017-07-04 16:22:36 · 219 阅读 · 0 评论 -
练习1-9 多个空格用一个空格代替
正常程序:#include main(void) { int c; int inspace=0; while((c = getchar()) != EOF) { if(c == ' ') { if(inspace == 0) { inspace = 1;原创 2017-07-05 15:25:10 · 669 阅读 · 0 评论 -
练习1-15 重写温度转换程序
#includeint tempreture(int);int fahr, cesius;main(){ int lower, upper, step; lower = 0; upper = 300; step = 20; while (fahr <= upper) { cesius = tempreture(fahr); printf("%d\t%d\n",原创 2017-07-12 16:58:50 · 615 阅读 · 0 评论 -
练习1-13
第一步:建立数组,并打印出不同长度的单词数目:#includemain(){ int c, i; int length = 0; int pitLock = 1; int charLen[10]; for (int i = 0; i < 10; i++) charLen[i] = 0; while ((c = getchar()) != EOF) { if原创 2017-07-11 16:45:07 · 440 阅读 · 0 评论 -
p8
#includemain(){ int fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr - 32) / 9; printf("%d\t%d\n", fa原创 2017-06-30 15:14:37 · 345 阅读 · 0 评论 -
C/C++经典资源
C/C++经典源代码网站50个c/c++源代码网站C/C++是最主要的编程语言。这里列出了50名优秀网站和网页清单,这些网站提供c/c++源代码。这份清单提供了源代码的链接以及它们的小说明。我已尽力包括最佳的C/C++源代码的网站。这不是一个完整的清单,您有建议可以联系我,我将欢迎您的建议,以进一步加强这方面的清单。1、http://snippets.dzone.com/tag/c转载 2016-06-23 09:08:47 · 2545 阅读 · 0 评论 -
牛逼c(2)
#include int main (void){ float weight; float value; printf ("Are you worth your weight in rhodium?\n"); printf ("Let's check it out.\n"); printf ("Please enter your weight in pounds: "); s原创 2016-06-04 10:02:24 · 747 阅读 · 0 评论 -
数组与指针的艺术--深入探索c/c++数组与指针的奥秘
转载转载转载转载转载转载转载转载转载转载转载转载转载转载转载http://topic.youkuaiyun.com/u/20091123/11/0c03d2e2-0655-4634-8287-0e2315d889fc.html?8345 前 言 此文是笔者2005年所作《再再论指针》的修订版,与前文相比,本文主要的不同点有如下几点: 一、引用C/C++标准的条款去阐述原理。C与C++标准共有四个已发行的正...转载 2018-03-23 11:06:10 · 653 阅读 · 0 评论