diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-12 20:39:59 +0000 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-12 20:39:59 +0000 |
commit | f9614fcb2b8921d99ce5248c0c1a231432a2f823 (patch) | |
tree | 3aab98768a75137078ff57bc7f9c70af62341c2e | |
parent | Parenthesis are hard (diff) | |
download | homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar.gz homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar.bz2 homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar.lz homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar.xz homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.tar.zst homework-f9614fcb2b8921d99ce5248c0c1a231432a2f823.zip |
Parenthesis are hard pt. 2
Diffstat (limited to '')
-rw-r--r-- | misc/test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/test.cpp b/misc/test.cpp index fd9c227..50d244b 100644 --- a/misc/test.cpp +++ b/misc/test.cpp @@ -8,11 +8,13 @@ int main () { for (i=x; i>1; --i) - {if (x%i==0 && x!=i) { + { + if (x%i==0 && x!=i) { cout << "Not prime!" << endl; a=1; break; - return i;}} + return i; } + } if (a!=1) cout << "Prime!" << endl; |