diff --git a/README.md b/README.md index dfcd0d8..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,22 +0,0 @@ -![Logo](https://i.imgur.com/bukndFq.png) - -

アルゴリズム

- -Hello, everyone! - -Let's contribute to [**Hacktoberfest 2018**](https://hacktoberfest.digitalocean.com/) while refreshing our *data structures and algorithms* knowledge. - -Implement your favorite **data structure/algorithm/crazy programming** magic and make a Pull Request. - -It can be **anything**! - -Maybe graphs? Sorting algorithms, dynamic programming, greedy algorithms, everything is welcome. - -**Any programming language is welcome. The more the better!** - -If you need help with contributing to a repository, [this is a good place to start](akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/#summary -) - - -# Credits -retro computer by Tinashe Mugayi from the Noun Project diff --git a/math/module/giun1.cpp b/math/module/giun1.cpp new file mode 100644 index 0000000..ce1ffe3 --- /dev/null +++ b/math/module/giun1.cpp @@ -0,0 +1,34 @@ +/* +Scrivere un programma C++ che, letta da input una sequenza di numeri interi +terminata dal tappo (o valore sentinella) 5 +stampi: +- la stringa “NESSUNO” + se nella sequenza non è presente alcun numero che sia un multiplo di 5 +- la stringa “ALMENO 1” + altrimenti. +ESEMPI: + Input: -3 42 37 28 5 + Output: “NESSUNO” + Input: -3 40 37 2 -8 5 + Output: “ALMENO 1” + Input: 5 + Output: “NESSUNO” + */ +#include +using namespace std; +int main () +{ + int n = 0; + while (n != 5) + { + cin >> n; + if ( n % 5 == 0) + { + cout << "ALMENO 1"; + return 0; + } + } + + cout << "NESSUNO"; + return 0; +}