第4章练习题--8--浮点数格式--2799
来源:互联网 发布:丰富的网络资讯吸引 编辑:程序博客网 时间:2024/06/08 03:31
这道题太坑爹了,排列!=排序!!!
#include <iostream>#include <stdio.h>#include <string>#include <string.h>#include <vector>#include <list>#include <math.h>#include <algorithm>using namespace std;int main(){ int maxnum , n , i , j , k ;char str[10001][51] ;scanf( "%d" , &n );memset( str , 0 , sizeof(char)*10001*51 );maxnum = 0;for( i = 0 ; i < n ; i++ ){scanf("%s",str[i]);for( j = 0 ; str[i][j]!='\0' ; j++ )if( str[i][j] == '.' ) break ;if( j > maxnum ) maxnum = j ;}for( i = 0 ; i < n ; i++ ){for( j = 0 ; str[i][j]!='\0' ; j++ )if( str[i][j] == '.' ) break ;for( k = 0 ; k < ( maxnum - j ) ; k++ )printf(" ");printf( "%s\n" , str[i] );} return 1; }
- 第4章练习题--8--浮点数格式--2799
- 百练OJ:2799:浮点数格式
- 浮点数存储格式
- 浮点数存放格式
- IEEE745浮点数格式
- 浮点数格式备忘
- 浮点数存储格式
- 十六进制 浮点数格式
- 浮点数存储格式
- 浮点数格式
- 浮点数保存格式
- IEEE 浮点数格式
- Python浮点数格式
- 第6章练习题--4--循环数--2952
- 浮点数的存储格式
- 浮点数的存储格式
- IEEE754 浮点数格式
- 浮点数的存储格式
- How to implement double currency
- 匿名內部類实例化接口 SqlMapClientTemplate SqlMapClientCallback
- UML类图几种关系的总结
- Java SQL Server 查询 Statement和PreparedStatemen的区别
- android页面切换效果zoomin、zoomout
- 第4章练习题--8--浮点数格式--2799
- 汇编指令大全
- 在ACE中使用epoll的ET模式
- vxworks BD表
- CMFCRibbonBar 获得最小化状态
- 循环结构
- equals 和 == 的区别
- 办理护照
- smarty自定义函数