Pascal:
var a,b,c:real;
begin
write ('Number 1: ');
readln (a);
write ('Number 2: ');
readln (b);
write ('Number 3: ');
readln (c);
writeln ('Srednee: ',(a+b+c)/3:0:4);
readln;
end.
C++:
#include
#include
using namespace std;
int main()
{
float a,b,c;
cout.setf(std::ios_base::fixed,std::ios_base::floatfield);
cout <<"Number 1: ";</span>
cin >>a;
cout <<"Number 2: ";</span>
cin >>b;
cout <<"Number 3: ";</span>
cin >>c;
cout.precision(4);
cout <<"Srednee: " <<(a+b+c)/3 <<endl;</span>
return 0;
}