Math
ศิรประภา บุญจีม 620710679
Math Data type?
PHP Math: abs() function
<?php
echo (abs(-7)."<br/>"); // (integer)
echo (abs(7)."<br/>"); // (integer)
echo (abs(-7.2)."<br/>"); // (float/double)
?> print(abs(-7)) # (integer)
print(abs(7)) # (integer)
print(abs(-7.2)) # (float)public class Main {
public static void main(String[] args) {
System.out.println(Math.abs(-7)); // (integer)
System.out.println(Math.abs(7)); // (integer)
System.out.println(Math.abs(-7.2)); // (float/double)
}
}using System;
class Program {
static void Main() {
Console.WriteLine(Math.Abs(-7)); // (integer)
Console.WriteLine(Math.Abs(7)); // (integer)
Console.WriteLine(Math.Abs(-7.2)); // (float/double)
}
}Output
7
7
7.27
7
7.27
7
7.27
7
7.2เปรียบเทียบ abs() function ในแต่ละภาษา
ภาษา
ฟังก์ชัน
วิธีการใช้
PHP Math: sqrt() function
Output
เปรียบเทียบ sqrt() function ในแต่ละภาษา
ภาษา
ฟังก์ชัน/คลาส
วิธีการใช้
PHP Math: rand() function
Output
เปรียบเทียบ rand() function ในแต่ละภาษา
ภาษา
ฟังก์ชัน/คลาส
วิธีการใช้
PHP Math: pow() function
Output
เปรียบเทียบ pow() function ในแต่ละภาษา
ภาษา
ฟังก์ชัน
วิธีการใช้
PHP Math: min() function and max() function
Output
เปรียบเทียบ min() function และ max() function ในแต่ละภาษา
ภาษา
ฟังก์ชัน
วิธีการใช้
Presentation
Video Clip
Reference
Last updated