Răspuns :
Răspuns:
var x,y,d:Integer;
Ma:Real;
Begin
write('Nr1= '); read(x);
write('Nr2= '); read(y);
d:=x-y;
Ma:=(x+y)/2;
writeln('Diferenta ',d);
writeln('Media aritmetica ',Ma);
End.
Răspuns:
#include <iostream>
using namespace std;
main()
{
int a,b,d,m;
cout<<"Introdu primul numar:";
cin>>a;
cout<<"Introdu al doilea numar:";
cin>>b;
d=a-b;
m=(a+b)/2;
cout<<"Diferenta este:"<<d<<endl;
cout<<"Media aritmetica este:"<<m;
}