P122 14
来源:互联网 发布:java 加密字符串实现 编辑:程序博客网 时间:2024/05/08 15:11
P122 第14题
法一(指针)
#include<stdio.h>#include<stdlib.h>#include<math.h>#include<conio.h>int main(){int s[]={1,2,3,4};int *pa=NULL, *pal=NULL;int N=sizeof(s)/sizeof(int);pal= pa=s;for(int i=0;i<N;++i){printf("%3d",*pa);pa++;}putchar('\n');while(--pa>=s) printf("%3d",*pa);putchar('\n');getch();return 0;}
法二(函数调用)
#include<stdio.h>#include<stdlib.h>#include<math.h>#include<conio.h>int Reverse(unsigned int s){ do{printf("%d",s%10);s=s/10;}while(s!=0);printf("\n");return 0;}int main(){int a;scanf("%d",&a);Reverse(a);return 0;}
0 0
- P122 14
- p122 14
- p122.14
- P122,14
- p122.14
- P122.14
- p122第14题
- P122 第14题 逆序
- p122 第三章 第14题 潘璠
- P122第14题(倒叙)
- 电信141p122第14题
- P122 第三章 14题 参数逆转
- p122.10
- P122 6
- P122 10
- P122 15
- P122 15
- P122 16
- UVA - 10004 - Bicoloring (简单图论-着色判断)
- lua学习之环境配置
- 判断一个单链表是否存在环
- 浅谈双线程dp (nyoj61 nyoj712)经典【传字条】和【探 寻 宝 藏】
- css+jquery导航列表
- P122 14
- JVM加载class文件的原理机制
- 理解C++默默编写并调用哪些函数
- Codeforces534E:Berland Local Positioning System
- java菜鸟程序媛成长第一天
- sql
- 解决i5-4590K使用Clover引导OSX在"root device uuid is ......"之后立即重启问题
- JAVA基础编程50题(22-24题)详解
- 了解new-handler的行为