关注

【C算法】编程初学者入门训练140道(1~20)

链接: 牛客编程初学者入门训练150题
希望大家学习和纠错。

BC1 实践出真知

链接: 实践出真知

【说明】
(1)printf的使用

#include <stdio.h>
 
int main(void) 
{
   
    printf("Practice makes perfect!\n");
     
    return 0;
}

BC2 我是大V

链接: 我是大V

【说明】
(1)\n的使用

#include <stdio.h>
 
int main() {
   
   printf("v   v\n v v\n  v\n");
    return 0;
}

BC3 有容乃大

链接: 有容乃大

【说明】
(1)打印sizeof()类型的值,使用%zd转换说明

#include<stdio.h>

int main()
{
   
    printf("The size of short is %zd bytes.\n",sizeof(short));
    printf("The size of int is %zd bytes.\n",sizeof(int));
    printf("The size of long is %zd bytes.\n",sizeof(long));
    printf("The size of long long is %zd bytes.\n",sizeof(long long));
    return 0;
}

BC6 小飞机

链接: 小飞机

【说明】
(1)注意对齐

#include <stdio.h>

int main()
{
   
    printf("     **\n");
    printf("     **\n");
    printf("************\n");
    printf("************\n");
    printf("    *  *\n");
    printf("    *  *\n");
    return 0;
}

BC7 缩短二进制

链接:

转载自CSDN-专业IT技术社区

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/dab112/article/details/138419377

评论

赞0

评论列表

微信小程序
QQ小程序

关于作者

点赞数:0
关注数:0
粉丝:0
文章:0
关注标签:0
加入于:--