首页 > 其他 > 详细

边写代码边注释,修改代码同时修改相应的注释

时间:2018-08-03 13:49:57      阅读:266      评论:0      收藏:0      [点我收藏+]

边写代码边注释,修改代码同时修改相应的注释,以保证注释与代码 的一致性。不再有用的注释要删除。

 

 1 #include <iostream>
 2 #include<math.h> 
 3 const double HD=3.1415926/180;
 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 5 using namespace std;
 6 
 7 int main(int argc, char** argv) {
 8     cout<<"x\tsin(x)"<<endl;
 9     for (int i=0;i<=180;i=i+30) 
10         cout<<i<<"\t"<<sin(i*HD)<<endl;
11     return 0;
12 }

 

边写代码边注释,修改代码同时修改相应的注释

原文:https://www.cnblogs.com/borter/p/9413357.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!