Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Zadanie6
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Program liczący pole i obwód koła");
  14.  
  15. double promien;
  16. double pole;
  17. double obwod;
  18.  
  19. Console.Write("Podaj promień koła: ");
  20. promien = Convert.ToInt32(Console.ReadLine());
  21.  
  22. pole = Math.PI * (promien * promien);
  23. obwod = 2 * Math.PI * promien;
  24.  
  25. Console.Write("Gdy promień wynosi {0} to pole jest rowne {1} a obwód {2}.", promien, pole, obwod);
  26.  
  27. Console.ReadKey();
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement