Codes: part 29

#!/usr/bin/ruby
a=-100
while a <=180
a +=1
sum1=a*a*a
b=-100
while b <=180
b +=1
sum2=5*b*b*b
sum3=sum1-sum2
if(sum3==1)
then
print(“(“,””, a, “)”,”^3 – 5*(“,””, b, “)^3 = 1”, “\n”)
end
end
end


Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s