【C++】计算所有小于N的勾股数组合,可以写入txt文件保存,每组占一行。

 1 #ifndef PYTHAGOREAN_H_
 2 #define PYTHAGOREAN_H_
 3 #include <iostream>
 4 class Pythagorean {
 5 public:
 6     // 打印出边长小于 n 的符合勾股定理的三角形的三边长度
 7     // print right triangles' sides (sides < n)
 8     // 可以指定输出流,默认为std::cout
 9     std::ostream& operator()(int n, std::ostream& os = std::cout);
10 };
11 
12 #endif // PYTHAGOREAN_H_

 # 2015年12月15日 00:39:43

https://github.com/shalliestera/triangle

posted on 2015-12-13 21:51  RuriGokou  阅读(919)  评论(0编辑  收藏  举报

导航