Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 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 ConsoleApp4
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Output();
  14.         }
  15.  
  16.         static void Output()
  17.         {
  18.             double degrees, Fx;
  19.  
  20.             for (int i = 0; i <= 180; i += 10)
  21.             {
  22.                 degrees = Math.Sin(i * Math.PI / 180.0) + Math.Cos(i * Math.PI / 180.0);
  23.                 Fx = Math.Sin(i) + Math.Cos(i);
  24.  
  25.                 Console.WriteLine("| {0,4:F1} | {1,5:F2} | {2,12:F4} |", degrees, Fx, Fx);
  26.             }
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement