Răspuns :
Prima varianta
#include<iostream>
using namespace std;
int main (){
int a,b,c,t;
cin>>a>>b>>c;
t=((a+b)*(a-b))/c;
cout<<t;
return 0;
}
A doua varianta
Stii ca (a+b)*(a-b)=[tex]a^{2}-b^{2}[/tex], deci notam a*a-b*b;
#include<iostream>
using namespace std;
int main (){
int a,b,c,t;
cin>>a>>b>>c;
t=(a*a-b*b)/c;
cout<<t;
return 0;
}
Mult mai simplu:
#include <iostream>
using namespace std;
int main()
{
int/long/double/float a,b,c;
cin>>a>>b>>c;
cout<<(pow(a,2)-pow(b,2))/c
}