![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c语言
小jian剑
这个作者很懒,什么都没留下…
展开
-
method printf pyramid and get one human himself live day
#include <stdio.h>int main(){int i, j, k, p;for (i = 5; i > 0; i–){for (k = i; k < 5; k++){printf(" ");}for (j = i; j > 0; j–){printf("x ");}for (p = i; p > 1; p–){printf(“x “);}printf(”\n\n\n”);}return 0;}原创 2021-01-23 22:17:10 · 105 阅读 · 1 评论 -
one knowledge tip about value and while loop
1.a=(b–,c++,b+c)in the end : a=b+c;2.while loopwhile(condition){++or–;then quit;}原创 2021-01-13 22:48:43 · 101 阅读 · 0 评论 -
overflow and underflow about language c
c languageoverflow and underflowwhen over one number its limit will overflowwhen under one number its limit will underflowjust one meaning well.when you input this format codeyou can get below words meaning.#include <stdio.h>int main(void){原创 2021-01-12 17:09:31 · 108 阅读 · 0 评论 -
const its usage
const int * p1; in this case, the format p1 its space can be change.int const * p2; in this case, the format p2 its pointer can not be change.for example.p1 =&i;p2 =&j;this case, p1=&l;also can equal to &k;p2=&j;p2 only equal t原创 2021-01-11 09:30:33 · 80 阅读 · 0 评论 -
int main or int main(void) about their distinguish
int main()can have one return value, also can not .int main(void)must have one return value.but can not be pass on value besides the its oneself function.原创 2021-01-11 08:23:54 · 70 阅读 · 0 评论 -
计算某年新年是星期几的公式【不过这天怎么也该是假期吧?】
马上元旦了,也就是新年。今天也是刚刚研究了一下,网上查出来一个公式,可以计算某年元旦具体是星期几。公式是这样的。//添加一个计算某年元旦具体是星期几的公式//day=year+(year-1)/4-(year-1)/100+(year-1)/400;//day%7==数字为0时为星期天,其他天数为1-6.然后,接下来是我自己编写的代码。正在转行程序员的作者,参考的代码也很简单。#include <stdio.h>main(){ int day, year, z; prin原创 2020-12-22 20:45:06 · 726 阅读 · 0 评论