Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication6.cpp : This file contains the 'main' function. Program execution begins and ends there.
- //
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int[] secti_aspon1000(int pole[], int delka_pole)
- {
- int sucet = 0;
- for (int a = 0; a < 5; a++)
- sucet = sucet + pole[delka_pole - 1 - a];
- int opakovani = 1;
- if(sucet < 1000)
- {
- setcti_aspon1000(2 * pole[], delka_pole * 2)
- opakovani ++;
- }
- return sucet;
- }
- int secti(int pole[], int delka_pole)
- {
- int sucet = 0;
- for (int a = 0; a < 5; a++)
- sucet = sucet + pole[delka_pole - 1 - a];
- return sucet;
- }
- int main(int argc, char** argv) {
- int pole[] = { 1, 2, 3, 4, 25, };
- int sucet = secti(pole, 5);
- cout << "Sucet : " << sucet << endl;
- int[] sucetMinTisic= secti_aspon1000(pole, 5)
- cout << "Sucet : " << sucetMinisTisic[0] << sucetMinTisic[1] << endl;
- cin.get();
- return 0;
- }
- // Run program: Ctrl + F5 or Debug > Start Without Debugging menu
- // Debug program: F5 or Debug > Start Debugging menu
- // Tips for Getting Started:
- // 1. Use the Solution Explorer window to add/manage files
- // 2. Use the Team Explorer window to connect to source control
- // 3. Use the Output window to see build output and other messages
- // 4. Use the Error List window to view errors
- // 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
- // 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