Friday, 9 October 2015

WAP To check Pythagorean triplets

#include<stdio.h>
#include<conio.h>
void main()
{int s1,s2,hyp;
printf("enter s1,s2,hyp");
scanf("%d%d%d",&s1,&s2,&hyp);
if((s1*s1+s2*s2)==hyp*hyp)
printf("yes");
else
printf("no");
getch();
}

No comments:

Post a Comment