zoukankan      html  css  js  c++  java
  • 开始写博客的第一天,如何用c实现“hello wolrd”

    “hello world”

    应该是大多数人学习的第一个代码

    那也就作为我第一篇博客的开端吧

    实现的代码如下

    #include <stdio.h>
    
    int main()
    
    {
       printf("hello world");
    
       return 0;
    }

    好像有点短

    ummmmm

    要不再试试显示我们输入地区叭

    比如“hello China”

    #include <stdio.h>
    
    int main()
    {
       printf("please input a distination
    ");
       char distination[200];
       gets(distination);
       printf("hello %s", distination);
       return 0;
    }

    我用了gets!(不过这种用法可以无限制的输入字符串,buffer不够的话会有可能会溢出)

    这样就,这样可以键入空格啦,遇到回车才会停止键入

    比如你可以输入  The United Kingdom

     

    好了这就是写的第一篇blog

    就这我都写了半小时

    感觉被汪队骗了???

    可能他就是想打扰我学高数的时间

    可恶啊

    希望以后能记录下自己一些有用的学习经历吧

    就这!

  • 相关阅读:
    poj3253Fence Repair (Huffman)
    poi3617Best Cow Line ——贪心法
    高级排序之——归并排序
    Aizu
    初级排序——冒泡排序
    cookie会话
    加载web资源文件
    servlet
    Http

  • 原文地址:https://www.cnblogs.com/luoyoucode/p/12566595.html
Copyright © 2011-2022 走看看