Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.55 KB | None | 0 0
  1. // ConsoleApplication6.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include <iostream>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8. int[] secti_aspon1000(int pole[], int delka_pole)
  9. {
  10.     int sucet = 0;
  11.  
  12.     for (int a = 0; a < 5; a++)
  13.         sucet = sucet + pole[delka_pole - 1 - a];
  14.    
  15.     int opakovani = 1;
  16.  
  17.     if(sucet < 1000)
  18.     {
  19.         setcti_aspon1000(2 * pole[], delka_pole * 2)
  20.         opakovani ++;
  21.     }
  22.  
  23.     return sucet;
  24. }
  25.  
  26. int secti(int pole[], int delka_pole)
  27. {
  28.     int sucet = 0;
  29.  
  30.     for (int a = 0; a < 5; a++)
  31.         sucet = sucet + pole[delka_pole - 1 - a];
  32.  
  33.     return sucet;
  34. }
  35.  
  36.  
  37. int main(int argc, char** argv) {
  38.  
  39.     int pole[] = { 1, 2, 3, 4, 25, };
  40.  
  41.     int sucet = secti(pole, 5);
  42.     cout << "Sucet : " << sucet << endl;
  43.  
  44.     int[] sucetMinTisic= secti_aspon1000(pole, 5)
  45.     cout << "Sucet : " << sucetMinisTisic[0] << sucetMinTisic[1] <<  endl;
  46.  
  47.  
  48.  
  49.     cin.get();
  50.     return 0;
  51.  
  52. }
  53.  
  54. // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
  55. // Debug program: F5 or Debug > Start Debugging menu
  56.  
  57. // Tips for Getting Started:
  58. //   1. Use the Solution Explorer window to add/manage files
  59. //   2. Use the Team Explorer window to connect to source control
  60. //   3. Use the Output window to see build output and other messages
  61. //   4. Use the Error List window to view errors
  62. //   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
  63. //   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement