C 练习实例27
C 语言教程
· 2019-02-21 18:42:27
题目:利用递归函数调用方式,将所输入的5个字符,以相反顺序打印出来。
程序分析:无。
实例
// Created by www.codercto.com on 15/11/9.
// Copyright © 2015年 码农教程. All rights reserved.
//
#include <stdio.h>
int main()
{
int i=5;
void palin(int n);
printf("请输入5个字符\40:\40");
palin(i);
printf("\n");
}
void palin(n)
int n;
{
char next;
if(n<=1) {
next=getchar();
printf("相反顺序输出结果\40:\40");
putchar(next);
} else {
next=getchar();
palin(n-1);
putchar(next);
}
}
以上实例输出结果为:
请输入5个字符 : abcde 相反顺序输出结果 : edcba
点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html
iBATIS实战
(加)Clinton Begin、(加)Brandon Goodin、(加)Larry Meadors / 叶俊 / 人民邮电出版社 / 2008-5 / 45.00元
《图灵程序设计丛书•Java系列•iBATIS in Action iBATIS实战》是讲述iBATIS框架的权威著作。书中既详实地介绍了iBATIS的设计理念和基础知识,也讨论了动态SQL、高速缓存、DAD框架等高级主题,还讲解了iBATIS在实际开发中的应用。《图灵程序设计丛书•Java系列•iBATIS in Action iBATIS实战》的最后给出了一个设计优雅、层次清晰的示例程序JGa......一起来看看 《iBATIS实战》 这本书的介绍吧!