C#第三章上机3
来源:互联网 发布:徐老师的淘宝店叫什么 编辑:程序博客网 时间:2024/05/17 21:46
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { int er, op; data s = new data(); s.slldata(); int[] i = s.slldata(); for (int j = 0; j < i.Length;j++ ) Console.WriteLine(i[j]); int name1 = 0; int name2 = 0; s.Gett(ref name1,ref name2); Console.WriteLine("奇数的个数是:{0},偶数的个数是:{1}",name1 ,name2); Console.ReadLine(); } }}
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class data { int er, op; public int[] slldata() { int[] array = new int[30]; array[0] = 1; array[1] = 1; for (int i = 2; i < 30; i++) { array[i] = array[i - 1] + array[i - 2]; } return array; } public void Gett(ref int er, ref int op) { int[] array = slldata(); foreach (int ted in array) { if (ted % 2 == 0) { er++; } else { op++; } } } }}
0 0
- C#第三章上机3
- C#第三章上机3
- c#第三章上机题2-3
- 使用C#开发数据库应用系统----------------- 第三章 上机练习
- C#第十四章上机3
- ACCPS1C#第三章上机练习2,3
- 第三章上机练习2,3
- 第三章 上机4
- 第三章 上机练习
- 第三章上机
- 第三章 上机+简答
- 第三章上机练习
- 第三章 上机练习1
- 2.第三章 上机[1]
- 第三章 上机练习三四
- 第三本 十三章上机
- 第三章 上机 员工打卡
- c# 第十一章 上机练习3
- 在linux下操作pcap文件的各种方法整理
- Java IO最详解
- HDU1242 简单优先队列
- maven学习系列——(四)maven仓库
- MyEclipse 2016 反编译插件安装
- C#第三章上机3
- eclipse中配置的tomcat 启动正常 但是访问报404错误
- C语言 - 判断整数倍
- usaco Cow Pedigrees
- Mac 上怎么简单小性能测试 推荐Apache
- Linux C——基于线程的tco的服务器与客户端
- Eclipse配置tomcat
- maven学习系列——(五)maven聚合与继承
- java IO结构详解