Compare commits

..
5 Commits
Author SHA1 Message Date
iva c2ea5788e2 dodan izzračun standardnega odklona 2026-10-24 14:10:45 +02:00
iva 737bead3bb dodan izračun povprečja 2026-10-18 12:21:40 +02:00
iva 221511d619 iskanje in izpis najmanjse stevke 2026-10-18 12:13:00 +02:00
iva 43f9e9f6cc koda popravljena tako da lahko zapises 10 stevilk 2026-10-18 11:58:51 +02:00
iva 232055474c definirala spremenljivke 2026-10-14 13:05:54 +02:00
3 changed files with 33 additions and 0 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+33
View File
@@ -1,2 +1,35 @@
#include <iostream> #include <iostream>
#include <cmath> #include <cmath>
using namespace std;
int main (){
double a,b,c,d,e,f,g,h,i,j; //lahko tudi float
cout << "Vpisi 10 stevilk: ";
cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
cout << "Stevilke so:" << a << " " << b << " " << c << " " << d << " " << e << " " << f << " " << g << " " << h << " " << i << " " << j << "\n";
double najmanjsa = fmin (a,b);
najmanjsa = fmin (najmanjsa,c);
najmanjsa = fmin (najmanjsa,d);
najmanjsa = fmin (najmanjsa,e);
najmanjsa = fmin (najmanjsa,f);
najmanjsa = fmin (najmanjsa,g);
najmanjsa = fmin (najmanjsa,h);
najmanjsa = fmin (najmanjsa,i);
najmanjsa = fmin (najmanjsa,j);
cout << "Minimum " << najmanjsa << "\n";
double povprecje = (a+b+c+d+e+f+g+h+i+j)/10;
cout << "Povprecje: "<< povprecje << "\n";
double StandardniOdklon = sqrt (( /*standardni odklon populacija*/
pow (a-povprecje, 2)+
pow (b-povprecje, 2)+
pow (c-povprecje, 2)+
pow (d-povprecje, 2)+
pow (e-povprecje, 2)+
pow (f-povprecje, 2)+
pow (g-povprecje, 2)+
pow (h-povprecje, 2)+
pow (i-povprecje, 2)+
pow (j-povprecje, 2)
)/10);
cout << "Standardni odklon: "<< StandardniOdklon << "\n";
return 0;
}