Advertisement
NoExisteLink

Rombo PROGRA

May 9th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4. void lineas(int N,int i){
  5. int k;
  6. for(k=1;k<=N-i;k++){cout<<" ";}
  7. for(k=1;k<=2*i-1;k++){
  8. cout<<k;
  9. if(k<2*i-1){cout<<" ";}}
  10. }
  11. int main(){
  12. int i,N;
  13. cin>>N;
  14. cout<<endl;
  15. for(i=1;i<=N;i++){
  16. cout<<endl;
  17. lineas(N,i);
  18. cout<<endl;}
  19. for(i=N-1;i>=1;i--){
  20. cout<<endl;
  21. lineas(N,i);
  22. cout<<endl;}
  23. _getch();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement