zoukankan      html  css  js  c++  java
  • C++ 注释

    C++ 注释
    程序的注释是解释性语句,您可以在 C++ 代码中包含注释,这将提高源代码的可读性。所有的编程语言都允许某种形式的注释。

    C++ 支持单行注释和多行注释。注释中的所有字符会被 C++ 编译器忽略。

     1 #include <iostream>
     2 
     3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
     4 #include<cmath>
     5 #include<iomanip>
     6 using namespace std; 
     7 int main(int argc, char** argv) {
     8     double a,b,c;
     9     cout <<"plese enter a,b,c:";
    10     cin >>a >>b >>c;
    11     if(a+b>c&&b+c>a&&c+a>b)
    12     {
    13         double s,area;
    14         s=(a+b+c)/2;
    15         area=sqrt(s*(s-a)*(s-b)*(s-c));
    16         cout <<setiosflags(ios::fixed)<<setprecision(4);
    17         cout<<"area="<<area<<endl;
    18     }
    19     else cout <<"it is not a trilateral!"<<endl;
    20     return 0;
    21 }
  • 相关阅读:
    vue-cli工具搭建vue-webpack项目
    关于闭包的理解
    运动-分页
    运动-无缝滚动
    运动-手风琴
    运动-模拟返回顶部
    运动—图片中心放大
    运动—运动框架
    webstorm 激活破解
    let和const
  • 原文地址:https://www.cnblogs.com/borter/p/9400890.html
Copyright © 2011-2022 走看看