安全问答

安全问答是一个知识全球问答,包含丰富的问答知识

首页 常规 游戏 娱乐 科技 程序员

输入n个数要求程序按输入时的逆序把这n个数打印出来已知整数不超过100个。也就是说按输入相反顺序打印这n个数。【输入样例】1 7 3 4 5【输出样例】5 4 3 7 1请使用c++

  • 日期: 2028-11-06
  • 标签: 科技

#include using namespace std; int main(){ int n; int a[105]; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=n-1;i>=0;i--) cout<<a[i]<<" "; return 0;
}


原文地址: https://www.cveoy.top/t/topic/fjOy 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录

  • 上一篇: English Editor Resume TemplateHELENA FOXRSNews Editor PROFILECONTACTAnulismi poir incididunt ut labore et dolore magnanatas aliqua Ut enim ad minim veniam quis nostrud exelk rcitation ullamco laboris
  • 下一篇: Electronic Engineer One Page English Yellow Resume Template尤小优应聘岗位:产品设计师邮箱:jiasmine163com电话:134-7674-8978所在地:广东省广州市海珠区性别:女生日:19990824PowerPoint工作技能PowerPointPowerPointPowerPoint自我评价工作技能Education exper

© 2019 • 2025 - 安全问答 站长邮箱:wxgpt@qq.com    ICP备案/许可证号:豫ICP备2024104334号-2