打印字母金字塔
2017-04-19 18:42
232 查看
#include<iostream> using namespace std; void Print() { for(int i='A';i<='Z';i++) { int k='Z'; int p='B'; int count1=26; int count2=25; while(count1>0){ if(k>i) { cout<<" "; } else { cout<<(char)k; } k--; count1--; } while(count2>0){ if(p>i) { cout<<" "; } else { cout<<(char)p; } p++; count2--; } cout<<endl; } } int main() { Print(); return 0; }
相关文章推荐
- 【C语言】打印26字母金字塔
- C语言打印字母金字塔(第一行是A 第二行是ABA ……)
- 打印升序降序字母金字塔
- 用java打印字母金字塔
- C语言打印字母金字塔(第一行是A 第二行是ABA ……)
- 打印金字塔代码
- 如何在asp.net项目开发的验证码图片和打印中区别0和O(零和字母O)
- (字符串)统计字母和数字个数,打印柱状图
- 打印金字塔
- oj打印字母菱形图案
- 2016: 打印金字塔----java版
- Unity_打印图形-金字塔
- 统计字符串中字母出现的次数并打印最多的字母----C语言练习题
- 使用C程序打印输出等腰三角形(或者是金字塔)
- 利用打印九九乘法表的思想输出字母的三角形
- php打印出空心金字塔
- 7-25 空心字母金字塔(10 分)
- 在屏幕上打印出n行的金字塔图案,如,若n=5,则图案如下:
- 编写Java程序,打印下图所示的字母组成的菱形(且每次运行时该菱形大小可能不一)。
- 使用ArrayList对大小写字母的随机打印