Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <math.h>
  4. #include <windows.h>
  5. using namespace std;
  6. int _tmain()
  7. {
  8. const int n=7;
  9. int srar,mas[n],i,min=100000000,ch;
  10. for (i = 0; i < n; i++) {
  11. cout<<"enter"; //elements
  12. cin>>mas[i];
  13. }
  14. for (i = 0; i < n; i++) {
  15. cout<<mas[i]<<" ";
  16. }
  17. for (i = 0; i < n; i++) {
  18. if (mas[i]<min) {
  19. min=mas[i];
  20. }
  21. }
  22. cout<<"minim"<<min; //min
  23. for (i = 0; i < n; i++) {
  24. if (mas[i]!=min) {
  25. mas[i]+=mas[i];
  26. srar=mas[i]/n-1;
  27. }
  28. min=srar;
  29. cout<<mas[i];
  30. }
  31. getch();
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement