Uses CRT;
var a,b:real;
begin
writeln ('Логарифмiчний калькулятор');
write ('Основа = ');
readln (a);
write ('Число = ');
readln (b);
write (ln(b)/ln(a));
readln;
end.
using System;
namespace HelloApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Логарифм");
Console.Write("Основа А = ");
double a = Convert.ToDouble(Console.ReadLine());
Console.Write("Число Х = ");
double b = Convert.ToDouble(Console.ReadLine());
double c = Math.Log(b) / Math.Log(a);
Console.Write("Вiдповiдь = "+ c);
Console.ReadKey();
}
}
}
#include <conio.h>
#include <iostream>
#include <cmath>
int main(void)
{
double a,b,s,r,m,d;
setlocale(LC_ALL, "");
std::cout << "Калькулятор логарифмiв\n \n";
std::cout << "Основа А = ";
std::cin >> a;
std::cout << "Число В = ";
std::cin >> b;
d=log(b)/log(a);
std::cout
<< "\nЛогарифм = "<< d << std::endl;
getch();
return 0;
}
print('Логарифмiчний калькулятор')
import math
a=int(input('Основа = '))
b=int(input('Число = '))
print (math.log(b)/math.log(a))
input()
TextWindow.WriteLine ("Логарифмiчний калькулятор")
TextWindow.Write ("Основа = ")
a=TextWindow.ReadNumber()
TextWindow.Write ("Число = ")
b=TextWindow.ReadNumber()
TextWindow.Write ( Math.NaturalLog(b)/Math.NaturalLog(a))
#include <stdio.h>
#include < math.h >
int main(void)
{
float a,b;
printf ("‹®Ј аЁд¬iзЁ© Є «мЄг«пв®а \n");
printf ("Ћб®ў = ");
scanf("%f", &a);
printf ("—Ёб«® = ");
scanf("%f", &b);
printf ("%.20f\n", log(b)/log(a));
scanf("\n");
return 0;
}
<title>Математичний калькулятор</title>
<body><div align="center">
<b>Логарифм</b>
<br>
<br>
<form name="mat" action="javascript:mat()" id="1419313176">
Основа А = <input name="A" type="text" value=" " size="4"></b>
Число Х = <input name="X" 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 A = document.mat.A.value;
var X = document.mat.X.value;
var sol = document.getElementById("mat");
var L = Math.log(X)/Math.log(A);
string = "LOG = "+L;
sol.innerHTML = string;
}
</script>
Class Program
Shared Sub Main()
Console.WriteLine("Логарифм")
Console.Write("Основа А = ")
Dim a As Double = Convert.ToDouble(Console.ReadLine())
Console.Write("Число Х = ")
Dim b As Double = Convert.ToDouble(Console.ReadLine())
Dim c As Double = Math.log(b)/Math.log(a)
Console.Write("Вiдповiдь = {0}",c)
Console.ReadLine()
End Sub
End Class
PRINT "Љ «мЄг«пв®а «®Ј аЁд¬iў"
INPUT "‚ўҐ¤iвм ®б®ўг = "; a
INPUT "‚ўҐ¤iвм зЁб«® = "; b
c = LOG(b) / LOG(a)
PRINT "‹®Ј аЁд¬ = "; c
INPUT z