31 条题解

  • 2
    @ 2023-6-20 20:03:36

    经典题

    解析:这道题 有手就行 看似简单,但不能大意。 首先输出的函数比较常用的是 cout这个函数, 它的格式是 cout << " ****** "; ,对于新手常常忘记最后的分号,背熟后在双引号里写下文本,

    **!!!注意!!!

    开头的两个单词都要大写,不要忘记,否则写对也是0分,那你可真是个大聪明

    #include  <iostream>
    using namespace std;
    int main()
    {
    cout << "Hello,World!";
    return 0;
    }
    

    以上为正确代码

    • 0
      @ 2024-6-16 11:44:33

      AC代码~ 注意不要把','输成' '不然没分~

      #include <bits/stdc++.h>//hetao2193769
      using namespace std;
      int main()
      {
          cout<<"Hello,World!";
          return 0;
      }
      
      • 0
        @ 2024-5-24 16:58:59
        #include <iostream>
        using namespace std;
        int main()
        {
            cout << "Hello,World!";
            return 0;
        }
        
        • 0
          @ 2024-3-2 11:03:42

          废话不多说 直接进入正题

          #include<bits/stdc++.h>//万能头文件😄 
          using namespace std;
          int main()
          {
              cout << "Hello,World!"; //输出
              return 0;
          }
          

          很简单的一道题,注意Hello,World!不要拼错

          • 0
            @ 2024-1-20 10:02:17

            解析:

            无输入,输出hello world

            参考代码(Python):

            print('Hello,World!')
            
            • 0
              @ 2024-1-13 22:06:36

              复制粘贴即可

              #include <bits/stdc++.h>
              #define int long long
              using namespace std;
              signed main()
              {
              	cout<<"Hello,World!";
              	return 0;
              }
              
              • 0
                @ 2023-10-6 19:19:05
                //很简单,但是不要忘了引号和分号
                #include <bits/stdc++.h>//万能开头
                using namespace std;
                int main()
                {
                    cout<<"Hello,World!";//输出
                    return 0;
                }
                //一手交赞,一手交货(代码)
                
                
                
                
                
                
                //核桃hetao1609095编程
                //水印
                
                • 0
                  @ 2023-8-8 16:09:03

                  C++の起点

                  #include <iostream>//也可以用万能头文件<bits/stdc++.h>
                  using namespace std;//程序初始化
                  int main()//调取主函数(可以理解为开始运行程序的必经步骤)
                  {
                      cout<<"hello world";//cout指令表示输出内容,也可以用puts
                      return 0;//结束程序运行
                  }
                  

                  搞定(点个赞叭

                  • 0
                    @ 2023-8-6 17:15:47

                    P0001.Hello,World!

                    题目描述

                    编写一个能够输出“Hello,World!”的程序,这个程序常常作为一个初学者接触一门新的编程语言所写的第一个程序,也经常用来测试开发、编译环境是否能够正常工作。

                    参考代码:

                    #include <bits/stdc++.h>
                    using namespace std;
                    int main()
                    {
                        cout << "Hello,World!";
                        return 0;
                    }
                    
                    • 0
                      @ 2023-7-27 18:44:27

                      C++数轴的原点--Hello,World!

                      #include <cstdio>
                      int main(){printf("%s","Hello,World!");}
                      
                      • 0
                        @ 2023-7-26 21:20:36

                        这里编程的起点——hello world

                        分析:

                        无输入,输出hello world

                        AC代码:

                        #include <iostream>
                        using namespace std;
                        int main()
                        {
                            cout << "hello world";
                            return 0;
                        }
                        
                        • 0
                          @ 2023-7-25 18:05:28

                          //全网最短

                          #include <iostream> using namespace std; int main(){ int f=101, v=0, a[12]={5,-7,16,11,4,3,0,4,19,0,3,-100},b[12]={-4,14,-18,-8,12,-120,36,12,-12,14,-8,64}; for (int i=0;i<=11;i++){cout << (char)(f+b[v++]/2+a[i]);} return 0;}

                          • 0
                            @ 2023-7-24 20:21:31

                            最短代码

                            #include <iostream>
                            int main(int argc, const char * argv[]) {
                                std::cout << "Hello,World!";
                                return 0;}
                            
                            • 0
                              @ 2023-7-16 10:41:20

                              编写头文件输出即可

                              #include<bits/stdc++.h>
                              using namespace std;
                              int main()
                              {
                                  cout<<"Hello,World!";
                              }
                              
                              • 0
                                @ 2023-7-14 11:07:13

                                编程起点——hello world

                                5级难度,认真的吗?

                                具体步骤: 1 导入头文件 2 指明存储位置std 3 使用cout输出 4 结束主函数

                                部分die码如下

                                int main()
                                {
                                    cout << "hello world";
                                    return 0;
                                }
                                

                                一定要加分号!

                                • 0
                                  @ 2023-7-6 21:39:24

                                  题目描述

                                  编写一个能够输出“Hello,World!”的程序,这个程序常常作为一个初学者接触一门新的编程语言所写的第一个程序,也经常用来测试开发、编译环境是否能够正常工作。

                                  #include <iostream>
                                  using namespace std;
                                  
                                  int main()
                                  {
                                      cout << "Hello,World!";
                                     return 0; 
                                  }
                                  
                                  • 0
                                    @ 2023-6-17 20:29:21

                                    #include <bits/stdc++.h> using namespace std;

                                    int main(){ cout<<"Hello,World!"; }

                                    • 0
                                      @ 2023-6-12 19:57:06

                                      又双叒叕是Hello wold

                                      难度:

                                      有手就行

                                      思路:

                                      导入头文件→程序的开始→输出文字→结束


                                      上代码:
                                      #include <iostream> //必备工具
                                      using namespace std; 
                                      int main() //程序的开始
                                      {
                                          cout  << "Hello,World!"; //输出Hello,World!
                                          return 0; //程序结束
                                      }
                                      
                                      • 0
                                        @ 2023-6-4 8:44:56

                                        输出:Hello, World! 是C++ 和很多编程语言的最简单、基本的程序。

                                        现在,我们来写一下这个程序。

                                        此程序需要用到输入输出的头文件:

                                        #include <iostream>
                                        

                                        还有下面语句:

                                        using namespace std;
                                        

                                        最重要的是下面的输出语句:

                                        cout
                                        

                                        此语句是 C++ 中最基本的输出语句,此语句后面要加上 << 输出流语句就可以输出,下面展示了 cout 的使用样例:

                                        #include <iostream>
                                        using namespace std;
                                        int main()
                                        {
                                        	cout <<1;  // cout 语句可以直接输出数字
                                        	return 0;
                                        }
                                        

                                        此代码可以输出一个数字 1 ,可是我们要输出的东西不是数字,怎么办?

                                        很简单,用双引号将我们要输出的东西引起来就行了,使用样例:

                                        #include <iostream>
                                        using namespace std;
                                        int main()
                                        {
                                        	cout <<"!@#%&@#@^%sadfD3w@#%D3DFDsgtyUJbF54$%";
                                        	return 0;
                                        }
                                        

                                        此代码可以输出一段乱七八糟的东西。

                                        目前为止,cout 的用法已经讲完了(其实还有很多,只是这里用不到了)

                                        于是,初级代码如下:

                                        #include <iostream>
                                        using namespace std;
                                        int main()
                                        {
                                        	cout <<"Hello,World!";
                                        	return 0;
                                        }
                                        
                                        • 0
                                          @ 2023-6-3 16:31:45
                                          #include<iostream>
                                          using namespace std;
                                          int main()
                                          {
                                              cout<<"Hello,World!";
                                              return 0;
                                          }
                                          

                                          信息

                                          ID
                                          72
                                          时间
                                          1000ms
                                          内存
                                          128MiB
                                          难度
                                          7
                                          标签
                                          递交数
                                          17349
                                          已通过
                                          4517
                                          上传者