Загрузить файлы в «/»
This commit is contained in:
37
task4.cpp
37
task4.cpp
@@ -1,19 +1,18 @@
|
||||
#include <iostream>
|
||||
#include <clocale>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int f;
|
||||
cout << "Enter the finger number (1-5): ";
|
||||
cin >> f;
|
||||
|
||||
switch (f) {
|
||||
case 1: cout << "pollex" << endl; break;
|
||||
case 2: cout << "index" << endl; break;
|
||||
case 3: cout << "medius" << endl; break;
|
||||
case 4: cout << "annularis" << endl; break;
|
||||
case 5: cout << "digitus minimus" << endl; break;
|
||||
default: cout << "Incorrect number!" << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
long long n;
|
||||
cout << "Number: ";
|
||||
cin >> n;
|
||||
long long m;
|
||||
m = llabs(n);
|
||||
if (m == 0) {
|
||||
cout << "All integers divide 0\n";
|
||||
return 0;
|
||||
}
|
||||
for (long long i = 1; i <= m; i++) if (m % i == 0) cout << i << " ";
|
||||
cout << "\n";
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user