C语言顺序和选择结构程序设计.pptVIP

  • 8
  • 0
  • 约1.92万字
  • 约 74页
  • 2019-09-24 发布于广东
  • 举报
* * * * * * * * * * * * * * 例 根据输入的字母输出相应的字符串 #include stdio.h void main() { int c; printf(Enter m or n or h or other:); c=getchar(); if (c== m‘) printf( Good morning!\n); else if (c==n‘) printf( Good night!\n); else if (c==h‘) printf( Hello!\n); else printf( ????????\n); } m? Good morning! * #includestdio.h main(){ int a; printf(input integer number: ); scanf(%d,a); switch (a){ case 1:printf(Monday\n); case 2:printf(Tuesday\n); case 3:printf(Wednesday\n); case 4:printf(Thursday\n); case 5:printf(Friday\n); case 6:p

文档评论(0)

1亿VIP精品文档

相关文档