diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-11 20:25:35 +0000 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-11 20:25:35 +0000 |
commit | f99d7e24a3d36adbc1ea831bb6905d75b994b355 (patch) | |
tree | f16bb2cfd38166a33e2c153f3c659d0459adf452 | |
parent | Fix a thing I guess (diff) | |
download | homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar.gz homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar.bz2 homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar.lz homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar.xz homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.tar.zst homework-f99d7e24a3d36adbc1ea831bb6905d75b994b355.zip |
Fix
Diffstat (limited to '')
-rw-r--r-- | misc/test.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/misc/test.cpp b/misc/test.cpp index 3deb381..b14f99a 100644 --- a/misc/test.cpp +++ b/misc/test.cpp @@ -5,21 +5,20 @@ using namespace std; int main () { unsigned long long x; - int a; cout << "Enter a number:"; cin >> x; unsigned long long i = (x-1); - + int a; for (i=x; i>1; --i) { if (x%i==0 && x!=i) { cout << "Not prime!" << endl; - a=1700; + a=1; break; return 3; } } - if (a!=1700) + if (a!=1) cout << "Prime!" << endl; return 2; -}
\ No newline at end of file +} |