Guest User

Untitled

a guest
Nov 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using System.Text;
  2.  
  3. namespace ConsoleApplication1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. while (true)
  10. {
  11. for (double i = 0; i <= 2.01; i = i + 0.01)
  12. {
  13. double promenna = Math.Sin(i * Math.PI);
  14. if ((promenna < 1E-14 && promenna > 0) || (promenna < 0 && promenna > -1E-14))
  15. promenna = 0;
  16. Console.WriteLine(promenna);
  17. }
  18.  
  19. if (Console.KeyAvailable == true) System.Environment.Exit(0); //Po stisknuti klavesy se program ukonci
  20. }
  21. }
  22. }
  23. }
Add Comment
Please, Sign In to add comment