No Title

11 October 2017

Views: 114

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main()
{
float a,b,l,p;

puts("wprowadz a");
scanf("%lf",&a);
puts("Wprowadz b");
scanf("%lf",&b);
l=(a+b)*(a-b);
p=a*a-b*b;
printf("l-p=%.10f
",l-p);

if(fabs(l-p)<1e-10)
{
puts("prawda");

}
else
{
puts("falsz");
}

return 0;
}

Share