1-3 数组的反序输出
来源:互联网 发布:网络暴力项目 编辑:程序博客网 时间:2024/06/02 05:59
1-3 数组的反序输出
Time Limit: 1000MS Memory Limit: 65536KB
Problem Description
C++中数组的输入输出方法。
10个int型数组中,而后再按与输入相反的顺序输出这些数据
Input
输出内容共Enter numbers(10 int)
---Reverse output---
<p class="\"cjk\"" 0.74cm;="" margin-bottom:="" 0cm\"="" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 3px;">第三行输出反序后的内容:顺序与输入顺序相反,每个数之间用一个空格间隔。Example Input
12 45 56 23 89 78 25 14 36 69
Example Output
Enter numbers(10 int)---Reverse output---69 36 14 25 78 89 23 56 45 12
Code realization
#include <iostream>using namespace std;int main(){ int a[10],i; for(i=0;i<10;i++) cin>>a[i]; cout<<"Enter numbers(10 int)"<<endl; cout<<"---Reverse output---"<<endl; for(i=9;i>=0;i--) { cout<<a[i]; if(i>0) cout<<" "; } return 0;}
#include <iostream>using namespace std;int main(){ int a[10],i; for(i=0;i<10;i++) cin>>a[i]; cout<<"Enter numbers(10 int)"<<endl; cout<<"---Reverse output---"<<endl; for(i=9;i>=0;i--) { cout<<a[i]; if(i>0) cout<<" "; } return 0;}
0 0
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 1-3 数组的反序输出
- 2709 1-3 数组的反序输出
- iphone 数组的正序、反序输出。
- 反序输出正整数和求数组交集的问题
- 数组的反序
- 体验用数组反序输出0-9
- 反序输出一个int型数组中所有数组元素(数字或字符)的值
- java的treemap反序输出
- C++实现字符串数组作为函数的参数的反序输出
- 第十三周项目1——2 反序输出和数组加倍
- 数组反序对的个数
- DB2大数据重一张表复制到另外一张表存储过程和直接在客户端中执行
- Revit开发之内建模型
- JavaScript 全局对象
- 鼠标悬停与点击效果
- noip2002 均分纸牌
- 1-3 数组的反序输出
- 问题 A: Elevator
- Andriod.mk详解
- 野木香linux学习笔记
- Git_Git基本操作_第5课_Git本地分支与合并
- PHP学习笔记之类
- 动态SQL拼接
- 64位Ubuntu kylin 16.04下使用DNW下载uboot到tiny4412的EMMC
- linux下C语言编程打印log日志