{"id":21354436,"url":"https://github.com/codeficct/vectores","last_synced_at":"2025-06-24T07:33:53.621Z","repository":{"id":125527353,"uuid":"533308753","full_name":"codeficct/vectores","owner":"codeficct","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-29T12:54:06.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T05:24:01.479Z","etag":null,"topics":["ing-mollo","programacion-1"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeficct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-06T12:17:17.000Z","updated_at":"2024-01-06T17:20:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"bea1368a-b2ca-4e64-945c-0302fe735ab4","html_url":"https://github.com/codeficct/vectores","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeficct/vectores","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeficct%2Fvectores","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeficct%2Fvectores/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeficct%2Fvectores/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeficct%2Fvectores/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeficct","download_url":"https://codeload.github.com/codeficct/vectores/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeficct%2Fvectores/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261628964,"owners_count":23186944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ing-mollo","programacion-1"],"created_at":"2024-11-22T04:13:27.673Z","updated_at":"2025-06-24T07:33:48.581Z","avatar_url":"https://github.com/codeficct.png","language":"C#","readme":"# vectores\nClase integerNumbers.cs\n```csharp\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace Vectores\n{\n    class Vector\n    {\n        // Property\n        const int MAX_LENGTH = 50;\n        private int[] numbers;\n        private int number;\n        // constructor\n        public Vector()\n        {\n            number = 0;\n            numbers = new int[MAX_LENGTH];\n        }\n        // Methods\n        public void setNumber(int n1, int a, int b)\n        {\n            int index = 0;\n            Random random = new Random();\n            number = n1;\n            for (index = 1; index \u003c n1; index++)\n            {\n                numbers[index] = random.Next(a, b);\n            }\n        }\n        public string getNumber()\n        {\n            string result = \"\";\n            int index = 0;\n            for (index = 1; index \u003c= number; index++)\n            {\n                result = result + numbers[index] + \"  -  \";\n            }\n            return result;\n        }\n\n        public int Sum()\n        {\n            int index, result = 0;\n            for (index = 0; index \u003c number; index++)\n            {\n                result = result + numbers[index];\n            }\n            return result;\n        }\n\n        public double Half()\n        {\n            return Sum() / (double)number;\n        }\n\n        public double Promhalf()\n        {\n            double f = 0, p = Half();\n            int index;\n            for (index = 0; index \u003c number; index++)\n            {\n                f = f + Math.Abs(p - numbers[index]);\n            }\n            return f / number;\n        }\n\n        public int CountPrime()\n        {\n            int count = 0, index;\n            IntegerNumber objNumber = new IntegerNumber();\n            for (index = 1; index \u003c number; index++)\n            {\n                objNumber.setNumber(numbers[index]);\n                if (objNumber.isPrime()) count++;\n            }\n            return count;\n        }\n\n        public int getMaxMin(bool max)\n        {\n            int index, major = numbers[1];\n            for (index = 2; index \u003c number; index++)\n            {\n                bool filter = max ? numbers[index] \u003e major : numbers[index] \u003c major;\n                if (filter) major = numbers[index];\n            }\n            return major;\n        }\n\n        public void SelectPrimes(ref Vector objResult)\n        {\n            int index;\n            IntegerNumber objNumber = new IntegerNumber();\n            objResult.number = 0;\n            for (index = 1; index \u003c number; index++)\n            {\n                objNumber.setNumber(numbers[index]);\n                if (objNumber.isPrime())\n                {\n                    objResult.number++;\n                    objResult.numbers[objResult.number] = numbers[index];\n                }\n            }\n        }\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeficct%2Fvectores","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeficct%2Fvectores","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeficct%2Fvectores/lists"}