Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- int prethoden_broj;
- int dali_sme_na_prviot_broj = 1;
- int strogo_rastecka_niza = 1;
- while(cin >> n) {
- if(n <= 0) {
- break;
- }
- if(dali_sme_na_prviot_broj == 1) {
- prethoden_broj = n;
- dali_sme_na_prviot_broj = -1;
- }
- else {
- if(n <= prethoden_broj) {
- strogo_rastecka_niza = 0;
- }
- prethoden_broj = n;
- }
- }
- if(strogo_rastecka_niza == 1) {
- cout << "Strogo rastecka" << endl;
- }
- else {
- cout << "Ne e strogo rastecka" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement