Created
November 21, 2018 21:35
-
-
Save Caellian/7543026fe4a6c2be23d57ea195359451 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int unos; | |
| cout<<"Unesi broj u intervalu <2,10>: "; | |
| cin>>unos; | |
| while(unos<=2 || unos>=10) { | |
| cout<<"Pogreška pri unosu, unesite broj u intervalu <2,10>: "; | |
| cin>>unos; | |
| } | |
| int broj=1; | |
| for(int x=1; x<=unos; x++) { | |
| broj=x; | |
| for(int y=unos; y>=x; y--){ | |
| cout<<" "<<broj++<<" "; | |
| } | |
| cout<<endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bravo kolega :)