Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ExemploTuplas01
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. (int, int) parValores = (7, 49);
  10. Console.WriteLine($"Valor = {parValores.Item1} ----- " +
  11. $"Quadrado = {parValores.Item2}");
  12.  
  13. (int, int, int) dezenas = (10, 20, 30);
  14. Console.WriteLine($"Valor 1 = {dezenas.Item1} ----- " +
  15. $"Valor 2 = {dezenas.Item2} ----- " +
  16. $"Valor 3 = {dezenas.Item3}");
  17.  
  18. var coordenadas = (latitude: "23.5505° S", longitude: "46.6333° W");
  19. Console.WriteLine($"São Paulo - " +
  20. $"Latitude = {coordenadas.latitude} - " +
  21. $"Longitude = {coordenadas.longitude}");
  22.  
  23. Console.ReadKey();
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement