69 条题解

  • 0
    @ 2023-2-12 12:28:00

    #include <iostream> using namespace std; int main() { int a,b,c,sum=0;//new cin>>a>>b>>c;//cin with a,b,c sum=sum+a+b;//and if (sum>c){ cout<<"yes"<<endl; } else{ cout<<"no"<<endl; } return 0; }

    • 0
      @ 2022-11-19 15:10:21
      #include <iostream>
       using namespace std;
       int main()
       {
          int a,b,c;
          cin >> a >> b >> c;
          if (a+b>c)
          {
              cout << "yes";
          }
          else
          {
              cout << "no";
          }
          return 0;
       }
      
      • 0
        @ 2022-9-21 17:09:03
        #include <bits/stdc++.h>
         using namespace std;
         int main()
         {
            int a,b,c;
            cin >> a >> b >> c;
            if (a+b>c)
            {
                cout << "yes";
            }
            else
            {
                cout << "no";
            }
            return 0;
         }
        

        第1行很重要,不要改,不然你会后悔的

        • 0
          @ 2022-8-30 8:48:54
          #include <iostream>
          using namespace std;
          int main()
          {
              int a,b,c; 
              cin >> a>>b>>c;
              if(a+b>c)
              {
              cout<<"yes";
          	}
          	else
          	{
           	 cout << "no";
          	}
              return 0;
          }
          
          • 0
            @ 2022-8-29 9:14:52

            这么简单的判断题尽量用三目运算符

            #include <iostream>
            
            int main()
            {
                using namespace std;
            
                long long a, b, c;
                cin >> a >> b >> c;
                a > b ? cout << "yes" : cout << "no";
                
                return 0;
            }
            

            iostream标准输入输出库 命名空间写在主函数里防止污染

            • 0
              @ 2022-8-27 20:03:35
              {
                  int a,b,c;
                  cin>>a>>b>>c;
                  if (a+b>c)//条件;
                  {
                      cout<<"yes";//得出结论;
                  }
                 //这里也作判定,用else会更简略;
                  return 0;
              }
              
              • 0
                @ 2022-8-23 20:11:18
                #include <iostream>
                 using namespace std;
                 int main()
                 {
                    int a,b,c;
                    cin >> a >> b >> c;
                    if (a+b>c)
                    {
                        cout << "yes";
                    }
                    else
                    {
                        cout << "no";
                    }
                    return 0;
                 }
                
                • 0
                  @ 2022-8-23 20:10:57
                  #include <iostream>
                   using namespace std;
                   int main()
                   {
                      int a,b,c;
                      cin >> a >> b >> c;
                      if (a+b>c)
                      {
                          cout << "yes";
                      }
                      else
                      {
                          cout << "no";
                      }
                      return 0;
                   }
                  
                  • 0
                    @ 2022-8-22 19:57:11

                    #include <iostream> using namespace std; int main() { int a,b,c;//输入 cin >> a >> b >> c;//赋值 if (a+b>c)//判断 { cout << "yes"; } else//那么 { cout << "no"; } return 0;//结束 }

                    • 0
                      @ 2022-8-22 14:44:49

                      #include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b>c) { cout<<"yes"; } else { cout<<"no"; } return 0;

                      先赞后看 养成习惯!👍

                      • @ 2022-10-13 9:10:24

                        若有代码,请使用MARKDOWN。

                        ——kkksc03

                    • 0
                      @ 2022-8-21 21:16:39

                      image

                      • 0
                        @ 2022-8-21 21:15:44

                        废话不多说,上代码。

                        if (a + b > c)
                            {
                                cout << "yes";
                            }
                            else
                            {
                                cout << "no";
                            }
                        
                        • 0
                          @ 2022-8-4 21:26:05

                          #include <bits/stdc++.h> using namespace std; int a,b,c;//定义变量 int main() { cin >> a >> b >> c;//输入变量 if(a + b > c)//判断前两个数a、b的和大于第三个数c { cout << "yes";//是 } else//否则 { cout << "no";//不是 } return 0; }

                          • 0
                            @ 2022-8-3 21:01:44

                            这一道题比上一道题要简单,用if-else语句即可

                            ```
                            #include <bits/stdc++.h>
                            using namespace std;
                            int main()
                            {
                                int a,b,c;
                                cin >> a >> b >> c;
                                if (a + b > c) cout << "yes";
                                else cout << "no";
                                return 0;
                            }
                            ```
                            
                            • 0
                              @ 2022-7-31 20:59:16

                              这题是要写if语句的C++代码程序,理解思路是先输入变量a、b、c,再输出a + b的和是否大于c,大于输出“yes”,小于输出“no”上代码!烦请各位支持一下小编~~~

                              #include <iostream>
                              using namespace std;
                              int a , b , c ;
                              int main(){
                                  cin >> a >> b >> c ;
                                  cout << (a+b>c?"yes":"no");
                                  return 0 ;
                              }
                              
                              • 0
                                @ 2022-7-8 15:34:23

                                #include <iostream> using namespace std; int main() { int a,b,c; cin >> a,b,b; if (a+b > c) { cout << "yes"; } else { cout << "no"; } return 0; }

                                • 0
                                  @ 2022-7-3 10:55:48

                                  #include<iostream> using namespace std; int main() { int n,sum=1; cin>>n; for(int i=1;i<=n;i++) { sum=sum*i; } cout<<sum; }

                                  • -1
                                    @ 2024-5-4 22:33:43

                                    #include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a+b>c) { cout<<"yes"; } else { cout<<"no"; } return 0; }

                                    • -1
                                      @ 2024-4-16 12:15:07
                                      #include <iostream>
                                      using namespace std;
                                      int main()
                                      {
                                          int a,b,c;
                                          cin>>a>>b>>c;
                                          if (a+b>c)cout<<"yes";
                                          else cout<<"no";
                                          return 0;
                                      }
                                      
                                      • -1
                                        @ 2024-1-1 21:47:15
                                        #include <iostream>
                                        using namespace std;
                                        int main()
                                        {
                                            int a,b,c;
                                            cin >> a >> b >> c;
                                            int m = a+b;
                                            if (m > c)
                                            {
                                                cout << "yes" << endl;
                                            }
                                            else
                                            {
                                                cout << "no" << endl;
                                            }
                                            return 0;
                                        }
                                        

                                        信息

                                        ID
                                        30
                                        时间
                                        1000ms
                                        内存
                                        16MiB
                                        难度
                                        5
                                        标签
                                        递交数
                                        15568
                                        已通过
                                        6525
                                        上传者