Cantidad De Numeros Impares En Un Vector.txt

  • Uploaded by: danny
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Cantidad De Numeros Impares En Un Vector.txt as PDF for free.

More details

  • Words: 79
  • Pages: 1
using using using using

System; System.Collections.Generic; System.Linq; System.Text;

namespace ConsoleApplication16 { class Program { static void Main(string[] args) { int N, i = 0, valor, c = 0; Console.Write("Ingrese tama�o del vector==>"); N = Convert.ToInt32(Console.ReadLine()); int[] A= new int[N]; while (i < N) { Console.Write("Ingrese valor en la posici�n {0}==>", i); valor = Convert.ToInt32(Console.ReadLine()); A[i] = valor; if (A[i] % 3 == 1) { c++; } i++;

} }

}

} Console.WriteLine("Cantidad de numeros impares es {0}", c); Console.ReadKey();

Related Documents


More Documents from ""

09012019
October 2019 56
October 2019 65
Proceso Tenifer.docx
December 2019 52
April 2020 36