Răspunsuri

Cel mai inteligent răspuns!
2014-11-12T23:50:31+02:00
Păi media aritmetică: 
//a 2 numere
#include <iostream>
using namspace std;
int main()
{int a,b;
float ma;
cout<<"a="; cin>>a;
cout<<"b=" cin>>b;
ma=(a+b)/2; 
cout<<"Media aritmetica este"<<" "<<"ma";
return 0;
}

//a 3 numere 
ma=(a+b+c)/3

//a n numere
for(i=1;i<=n;i++)
{s=s+i;
nr++;}
ma=s/nr; 

Media geometrica: 
#include <iostream>
#include <math.h>
using namspace std;
int main()
{int a,b;
float mg;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
mg=sqrt(a*b); 
cout<<"Media geometrica este"<<" "<<mg;
return 0;
}



5 4 5