Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
83
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 opakovani = 0;
  9.  
  10. int secti_aspon1000(int pole[], int delka_pole)
  11. {
  12.     int sucet = 0;
  13.  
  14.     for (int a = 0; a < 5; a++)
  15.         sucet = sucet + pole[delka_pole - 1 - a];
  16.  
  17.     if(sucet < 1000)
  18.     {
  19.         opakovani ++;
  20.         setcti_aspon1000(2 * pole[], delka_pole * 2)
  21.        
  22.     }
  23.  
  24.     return sucet;
  25. }
  26.  
  27. int secti(int pole[], int delka_pole)
  28. {
  29.     int sucet = 0;
  30.  
  31.     for (int a = 0; a < 5; a++)
  32.         sucet = sucet + pole[delka_pole - 1 - a];
  33.  
  34.     return sucet;
  35. }
  36.  
  37.  
  38. int main(int argc, char** argv) {
  39.  
  40.     int pole[] = { 1, 2, 3, 4, 25, };
  41.  
  42.     int sucet = secti(pole, 5);
  43.     cout << "Sucet : " << sucet << endl;
  44.  
  45.     int[] sucetMinTisic= secti_aspon1000(pole, 5)
  46.     cout << "Sucet : " << sucetMinisTisic << <<"opakovávní" opakovani <<  endl;
  47.  
  48.  
  49.  
  50.     cin.get();
  51.     return 0;
  52.  
  53. }
  54.  
  55. // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
  56. // Debug program: F5 or Debug > Start Debugging menu
  57.  
  58. // Tips for Getting Started:
  59. //   1. Use the Solution Explorer window to add/manage files
  60. //   2. Use the Team Explorer window to connect to source control
  61. //   3. Use the Output window to see build output and other messages
  62. //   4. Use the Error List window to view errors
  63. //   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
  64. //   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