Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Ex_3_ASPNET_04_Array
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Declarando variáveis
- int[] iValoresX = new int[10];
- int[] iValoresY = new int[10];
- //Entrada de dados
- for (int i = 0; i < iValoresX.Length; i++) //.Lenght trás o comprimento do array
- {
- Console.Write("Digite o {0}º valor de X: ", (i + 1));
- iValoresX[i] = Convert.ToInt32(Console.ReadLine());
- }
- Console.WriteLine("\n");
- int iPosicaoY = 0;
- for (int j = 9; j >= 0; j--)
- {
- iPosicaoY += 1;
- iValoresY[j] = iValoresX[j];
- Console.WriteLine("{0}º valor de Y é: {1}",(iPosicaoY), iValoresY[j]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement