Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace PovrsinaKruga
  6. {
  7. class Program
  8. {
  9. //Povrsina kruga se racuna pi * r ^ 2
  10. static string Povrsina(int precnik)=> $"Povrsina kruga sa zadanim precnikom iznosi: {3.14 * Math.Pow(precnik, 2)}";
  11.  
  12. static void Main(string[] args)
  13. {
  14.  
  15. int r;
  16.  
  17. Console.WriteLine("Unesite precnik: ");
  18. r = Convert.ToInt32(Console.ReadLine());
  19.  
  20. Console.WriteLine(Povrsina(r));
  21.  
  22. Console.ReadKey();
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement