Problem Solution: Special Pythagorean triplet

Updated: Dec 16, 2020

public class SpecialPythagoreanTriplet {

public static void main(String[] args) { // TODO Auto-generated method stub

long sum = 0, total = 1000;

for (double a = 1; a <= total / 3; a++) { for (double b = 1; b <= total / 2; b++) {

double c = total - a - b; double e = Math.pow(a, 2); double f = Math.pow(b, 2); double g = Math.pow(c, 2);

sum = (long) (a * b * c);

if (Math.pow(a, 2) + Math.pow(b, 2) == Math.pow(c, 2)) { System.out.println("a: " + a + " b: " + b + " c: " + c); System.out.println("e: " + e + " f: " + f + " g: " + g); System.out.println("Sum: " + sum); } } }

}

}



How to blog from desktop

First Publish your site in the Wix Editor, then go to your live site and login with your Wix account. Once you’re logged in you can write and edit posts, manage comments, pin posts and more. Just click on the 3 dot icon ( ⠇) to see all the things you can do.



You can manage your blog from anywhere, all you need is your website’s URL and Wix login info.



How to blog from mobile

Before you can blog from mobile, Publish your site in the Wix Editor from desktop.

Open your website from your mobile phone, then use the login bar to sign into your account. Be sure to use your Wix account info.



With Wix Blog you can do everything from your phone: write posts, follow members, manage comments & more.




#vacation

20 views0 comments

Recent Posts

See All

IGU is certified to operate by SCHEV. Accredited by ACCSC.

SCHEVlogo653SMALLWeb.png
1000px-Seal_of_the_United_States_Departm
ACCSC-Blue.png
NC-SARA-Approved-Institution-logo-round.
facebook (1).png
twitter (1).png
instagram.png
youtube.png
linkedin.png

© 2008 - 2021 Copyright, IGlobal University. All rights reserved.

IGU logo transparent background - Copy.p
Apply-Now_button_2.gif
Request-more-information.gif

Creating an ecosystem between industry
and academia to build a skilled workforce.