Commit 7ea20dfc authored by slabype's avatar slabype
Browse files

odevzdání úkolu

parent aec7cbbe
No related merge requests found
Pipeline #1786 failed with stages
Showing with 41 additions and 0 deletions
+41 -0
#include <iostream>
using namespace std;
int main()
{
int n;
int r = 0;
int onetwo = 0;
int result;
int divider = 1;
int number = 2;
cout << ("Napis cislo");
cin >> n;
while (n != r)
{
if (number >= divider)
{
if (onetwo % divider == 0)
{
onetwo++;
if (onetwo == 2 && number == divider)
{
r++;
result = number;
}
}
divider++;
}
else
{
number++;
divider = 1;
onetwo = 0;
}
}
cout << result;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment