了解湖南/长沙凯时app资讯,从湖南凯时app网开始!湖南凯时app报名湖南凯时app本科
您当前的位置:凯时app > 湖南凯时app考前练习

凯时app“高级语言程序设计”经典习题及答案(13)

凯时app“高级语言程序设计”经典习题及答案(13)

 

  9.编一个程序显示ASCII代码0x20至ox6f的十进制数值及其对应字符。xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  “解”显示ASCII代码为十六进制0x20至ox6f的字符的十进制代码值与其字符。程序可用一个循环,让变量i顺序地取0X20至OX6f的值,并逐一输出其十进制代码和对应的字符,程序如下:xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  # includexxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  main()xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  { int i,k=0;xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  for(i=0x20; i<=0x6f;i++) {xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  if(k++== O)/*每行十个*/xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“=(%C)”, i,i);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  10.用三种循环语句分别编写程序显示1至100的平方值。xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  “解”用三种循环语句分别编写显示1至100的平方值的程序。直接写出3个程序如下:xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  (1) 用输循环实现的程序xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  # includexxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  main() /*用for循环*/xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  { int i,k=0;xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  for(i=l;i<=100;i++) {xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  if(k++%5==0) /*每行五个*/xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“=*==]”,i,i,i*i);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  (2) 用while循环实现的程序xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  # includexxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  main() /*用 while循环*/xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  { int i,k=0 ;xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  i=1;xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  while(<=100){xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  if(k++%5==0)/*每行五个*/xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“=*==]”, i,i,i*i);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  1++;xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  printf(“/n”);xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

  }xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

 xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

xxK湖南凯时app网_湖南凯时app本科_湖南凯时app报名_凯时app

 

凯时app“高级语言程序设计”经典习题及答案(13)

    湖南凯时app网——致力于打造湖南凯时app网第一网,以努力服务于广大湖南凯时app学子、提供最全的湖南凯时app资讯为己任,发布湖南凯时app最新的新闻资讯,提供湖南凯时app专科湖南凯时app本科湖南凯时app报名湖南凯时app成绩查询等综合信息

 

湖南凯时app
相关文章
    无相关信息
湖南网站主页
湖南凯时app政策
凯时app30年大事
湖南凯时app专业
湖南凯时app问答
名家访谈
湖南凯时app故事
湖南凯时app院校
湖南凯时app大纲
凯时app复习方法
凯时app笔记串讲
凯时app应试技巧
湖南凯时app真题
湖南凯时app就业
湖南论文指导
湖南凯时app实践
湖南凯时app学位
凯时app成绩查询
凯时app考籍查询
凯时app学历查询


咨询QQ:137847917
13548661633(微信同号)

w66利来国际 w66利来国际 w66利来国际 w66利来国际 w66利来国际