diff --git a/cpp/sr.cpp b/cpp/sr.cpp new file mode 100644 index 0000000..4900533 --- /dev/null +++ b/cpp/sr.cpp @@ -0,0 +1,37 @@ +#include +#include +using namespace std; + +int main() +{ + int a[] = {41, 558, 541, 559,63, 62, 551, 155}; + int n,i,max,min; + float sr,suma; + + n=sizeof(a)/sizeof(int); + cout<<"n = "<max) max=a[i]; + cout<<"\n max = "< null"); + return 0; +} + diff --git a/cpp/sum_2.cpp b/cpp/sum_2.cpp new file mode 100644 index 0000000..283fadb --- /dev/null +++ b/cpp/sum_2.cpp @@ -0,0 +1,19 @@ +//suma liczb parzystych +#include + +using namespace std; + +int main() +{ + int t[] = {4,7,9,3,10,2,5,6}; + int suma,i,n; + n=sizeof(t)/sizeof(t[0]); + + suma=0; + for(i=0;i