fork download
  1. using static System.Console;
  2.  
  3. public class Program {
  4. public static void Main() {
  5. int []vetor = { 1, 2, 3, 4, 5, 6, 7, 8, 10 };
  6. for (int i = 0; i < vetor.Length; i++ ) vetor[i] *= vetor[i];
  7. WriteLine($"{string.Join(", ", vetor)}.");
  8. }
  9. }
  10.  
  11. //https://pt.stackoverflow.com/q/457059/101
Success #stdin #stdout 0.02s 16040KB
stdin
Standard input is empty
stdout
1, 4, 9, 16, 25, 36, 49, 64, 100.