Created
October 3, 2015 14:01
-
-
Save cagataycali/eb12cb69ef4456f30c0a to your computer and use it in GitHub Desktop.
C dilinde , Hipotenusu 500'e kadar olan pisagor üçlülerini ekrana yazan program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Hipotenusu 500'e kadar olan pisagor uclulerini ekrana yazar. */ | |
#include<stdio.h> | |
int main( void ) | |
{ | |
int a; /* birinci dik kenar */ | |
int b; /* ikinci dik kenar */ | |
int hipotenus; | |
for(a = 1; a < 500; a++) | |
for(b = a; b < 500; b++) | |
for(hipotenus = b+1; hipotenus <= 500; hipotenus++) | |
if( (a*a + b*b) == hipotenus*hipotenus ) | |
printf("%5d%5d%5d\n", a, b, hipotenus); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment