Skip to content

Instantly share code, notes, and snippets.

@Caellian
Created November 21, 2018 21:35
Show Gist options
  • Select an option

  • Save Caellian/7543026fe4a6c2be23d57ea195359451 to your computer and use it in GitHub Desktop.

Select an option

Save Caellian/7543026fe4a6c2be23d57ea195359451 to your computer and use it in GitHub Desktop.
#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;
}
@MajaVrancich

Copy link
Copy Markdown

Bravo kolega :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment