import math n = 0 for a in range(1,49): for b in range(a,49): c = math.ceil(math.sqrt(a**2+b**2)) if c<50 and c**2 == a**2 + b**2: if(n%6 == 0): print("%2d,%2d,%2d"%(a,b,c),end='\t') n+=1 n = 0 for a in range(1,49): for b in range(a,49): for
勾股数:勾股数又名毕氏三元数 .勾股数就是可以构成一个直角三角形三边的一组正整数.勾股定理:直角三角形两条直角边a.b的平方和等于斜边c的平方(a²+b²=c²) 要求:输出1000以内的勾股数 from math import sqrt for a in range(1,1000): for b in range(a,1000): c = sqrt(a * a + b * b) if c > 10000: break if c.is_integer(): #内置函数,判断一个浮点数是否长得像整
网吧充值系统namespace ConsoleApplication1 { class Program { struct huiyuan { public string name; public string password; public double yue; } static void Main(string[] aaa) { ArrayList Ul = new ArrayList(); while (true) { try { Console.WriteLine("请输入您要执行的操