Uses CRT;
var g,sinn,coss,tg,ctg:real;
begin
writeln ('Тригонометричний калькулятор');
write ('Градус = ');
readln (g);
sinn:=sin(g/180*Pi);
coss:=cos(g/180*Pi);
tg:=sinn/coss;
ctg:=1/tg;
writeln('SIN = ',sinn:5:5);
writeln('COS = ',coss:5:5);
writeln('TG = ',tg:5:5);
writeln('CTG = ',ctg:5:5);
readln;
end.
using System;
namespace HelloApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Тригонометрiя");
Console.Write("Введiть градус G = ");
double g = Convert.ToDouble(Console.ReadLine());
double sin = Math.Sin(g / 180 * Math.PI);
double cos = Math.Cos(g / 180 * Math.PI);
double tg = sin / cos;
double ctg = 1 / tg;
Console.WriteLine("SIN = {0}", sin);
Console.WriteLine("COS = {0}", cos);
Console.WriteLine("TG = {0}", tg);
Console.WriteLine("CTG = {0}", ctg);
Console.ReadKey();
}
}
}
#include <conio.h>
#include <iostream>
#include <cmath>
int main(void)
{
double a;
setlocale(LC_ALL, "");
std::cout << "Тригонометричний калькулятор\n \n";
std::cout << "Градус = ";
std::cin >> a;
std::cout
<< "\nSIN = "<< sin(a/180*M_PI)
<< "\nCOS = "<< cos(a/180*M_PI)
<< "\nTG = "<< sin(a/180*M_PI)/cos(a/180*M_PI)
<< "\nGTG = "<< cos(a/180*M_PI)/sin(a/180*M_PI)
<< std::endl;
getch();
return 0;
}
print('Тригонометричний калькулятор')
import math
g=int(input('Градус = '))
print ('SIN = ',math.sin(g/180*math.pi))
print ('COS = ',math.cos(g/180*math.pi))
print ('TG = ',math.sin(g/180*math.pi)/math.cos(g/180*math.pi))
print ('CTG = ',math.cos(g/180*math.pi)/math.sin(g/180*math.pi))
input()
TextWindow.WriteLine ("Тригонометричний калькулятор")
TextWindow.Write ("Градус = ")
a=TextWindow.ReadNumber()
TextWindow.Write ("SIN = ")
TextWindow.Writeline ( Math.Sin(a/180*Math.pi))
TextWindow.Write ("COS = ")
TextWindow.Writeline ( Math.Cos(a/180*Math.pi))
TextWindow.Write ("TG = ")
TextWindow.Writeline ( Math.Sin(a/180*Math.pi)/Math.Cos(a/180*Math.pi))
TextWindow.Write ("CTG = ")
TextWindow.Writeline ( Math.Cos(a/180*Math.pi)/Math.Sin(a/180*Math.pi))
#include <stdio.h>
#include < math.h >
int main(void)
{
float g, sinn, coss, tg, ctg;
printf ("’аЁЈ®®¬ҐваЁзЁ© Є «мЄг«пв®а \n");
printf("ѓа ¤гб = ");
scanf("%f", &g);
sinn = sin(g / 180 * M_PI);
coss = cos(g / 180 * M_PI);
tg = sinn / coss;
ctg = coss / sinn;
printf("SIN = %5.5f\n",sinn);
printf("COS = %5.5f\n",coss);
if (coss==0) {printf("TG = infiniti\n");} else {printf("TG = %5.5f\n",tg);}
if (sinn==0) {printf("CTG = infiniti\n");} else {printf("CTG = %5.5f\n",ctg);}
scanf("\n");
return 0;
}
<title>Математичний калькулятор</title>
<body><div align="center">
<b>Тригонометрія</b>
<br>
<br>
<form name="mat" action="javascript:mat()" id="1419313176">
Градус G = <input name="G" type="text" value=" " size="4"></b>
<br>
<br>
<input type="submit" value="Порахувати">
<input type="reset" value="Reset">
</form>
Відповідь: <br> <span id="mat">Введіть данні і нажміть "Порахувати"</span>
</div>
<script language="javascript">
function mat() {
var G = document.mat.G.value;
var sol = document.getElementById("mat");
var sin = Math.sin(G/180*Math.PI);
var cos = Math.cos(G/180*Math.PI);
var tg = sin/cos;
var ctg = cos/sin;
string = "SIN = "+sin+"<br>"+"COS = "+cos+"<br>"+"TG = "+tg+"<br>"+"CTG = "+ctg;
sol.innerHTML = string;
}
</script>
Class Program
Shared Sub Main()
Console.WriteLine("Тригонометрiя")
Console.Write("Введiть градус G = ")
Dim g As Double = Convert.ToDouble(Console.ReadLine())
Dim sin As Double = Math.sin(g/180*Math.PI)
Dim cos As Double = Math.cos(g/180*Math.PI)
Dim tg As Double = sin/cos
Dim ctg As Double = 1/tg
Console.WriteLine("SIN = {0}",sin)
Console.WriteLine("COS = {0}",cos)
Console.WriteLine("TG = {0}",tg)
Console.WriteLine("CTG = {0}",ctg)
Console.ReadLine()
End Sub
End Class
PRINT "’аЁЈ®®¬ҐваЁзЁ© Є «мЄг«пв®а"
INPUT "‚ўҐ¤iвм Ја ¤гб = "; g
s = SIN(g / 180 * 3.141592654#)
c = COS(g / 180 * 3.141592654#)
t = s / c
ct = c / s
PRINT "COS = "; c
PRINT "SIN = "; s
IF c = 0 THEN PRINT "TG = @#& " ELSE PRINT "TG = "; t
IF s = 0 THEN PRINT "CTG = @#& " ELSE PRINT "CTG = "; ct
INPUT z