【LVL1_5_c】【课后练习】【3】 求两个数组的对应元素之和。
2015-12-26 16:23
246 查看
// ConsoleApplication2.cpp : 定义控制台应用程序的入口 #include "stdafx.h" #include <cmath> #include<stdlib.h> int _tmain(int argc, _TCHAR* argv[]) { int a[5] = {1,2,3,4,5}; int b[5] = {11,4,2,7,9}; int c[5] = { 0 }; int acc; for (acc = 0; acc < 5; acc++) { c[acc] = a[acc] + b[acc]; printf("%d\n", c[acc]); } system("pause"); return 0; }
相关文章推荐
- Git 版本控制工具(分布式管理)
- XML文档解析几种方式
- iOS初体验---通知
- android随笔09——中断电话
- Oracle APEX 5.0 新手教程(五) 登录控制
- 猜数字游戏
- java之冒泡排序与选择排序
- Model的合理使用时机
- Python Argparse 简易指南
- 【VirtualBox】虚拟硬盘格式vdi和vmdk相互转换方法
- Java过滤器与SpringMVC拦截器之间的关系与区别
- Oracle APEX 5.0 新手教程(四) 页面动态生成
- IOS UICollectionView 横向分页加载(左滑加载数据)
- vs2010 files 的值乱码
- 剑指Offer:树的子结构(JAVA)
- 147,函数
- Java或Android中计算某点是否在多边形中
- 期末总结
- Xcode 查看运行时ViewController结构
- 判断ios app 第一次启动