I’ve been programming in C++ for over a decade and am thinking of learning Rust. Finding a number whose square is the sum of three different positive squares in at least two disjoint ways, which I used in test code in a C++ program, I wrote a Rust program to find out what other numbers’ squares can be written as the sum of three different positive squares. Here’s the program; how can it be improved?

```
fn main()
{
for a in 1..101
{
let mut b=1;
while a*a-b*b>=0
{
let mut c=1;
while a*a-b*b-c*c>=0 && c<b
{
let mut d=1;
while a*a-b*b-c*c-d*d>=0 && d<c
{
if a*a-b*b-c*c-d*d==0
{
println!("{}²={}²+{}²+{}²",a,b,c,d);
}
d+=1;
}
c+=1;
}
b+=1;
}
}
}
```