综合实验二参考程序.docVIP

  • 6
  • 0
  • 约1.09万字
  • 约 13页
  • 2017-08-17 发布于江西
  • 举报
设计一个字符串数组的统计工具,可以实现以下功能: 统计所有大写字母的个数; 统计所有小写字母的个数; 将所有字母转换为大写字母; 将所有字母转换为小写字母。 #include iostream.h #include stdio.h #include string.h void main() { char c[100], b[100]; unsigned uc, i, cnt; coutPlease input a string:endl; gets(c); do { coutendl; coutThe original string is \c\endl; coutendl; cout********** String Tool **********endl; cout1. Count uppercase letters.endl; cout2. Count lowercase letters.endl; cout3. Change all letters to uppercase.endl; cout4. Change all letters to lowercase.endl; cout0. Exitendl; cinuc; coutendl; switch(uc) { case 1: cnt=0;

文档评论(0)

1亿VIP精品文档

相关文档