Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.  
  5. int i1, i2;
  6. const int ROWS = 10;
  7. i1=ROWS, i2=1;
  8.  
  9. for (i1=ROWS; i1>=1; --i1) //second triangle
  10. {
  11.  
  12. for (i2=1; i2<=(ROWS-i1); ++i2)
  13. {
  14. cout << "*";
  15. }
  16.  
  17. for (i2=1; i2<=i1; ++i2)
  18. {
  19. cout << "c";
  20. }
  21. cout << "x" << endl;
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement