Advertisement
Guest User

segitiga huruf

a guest
May 16th, 2012
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. //segitiga huruf, vyn.
  2.  
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int L;
  10.     cout<<"baris :";cin>>L;
  11.     for (int i = 1; i <= L; i++)
  12.     {
  13.         for (int j = L; j > i; j--)
  14.             cout<<" ";
  15.         int j;
  16.         for (j = 1; j<= i; j++)
  17.             {char huruf = (char) j + 64;cout<<huruf;}
  18.         for (int k = j-2; k>=1; k--)
  19.             {char huruf = (char) k + 64;cout<<huruf;}
  20.         cout<<endl;
  21.     }
  22.     system("pause");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement