1. Viết tập lệnh PHP để lấy phiên bản PHP và thông tin cấu hình. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the PHP version and configuration information. Go to the editor 2. Viết tập lệnh PHP để hiển thị các chuỗi sau. Truy cập chuỗi mẫu biên tập: 'Ngày
mai tôi sẽ học các biến toàn cầu PHP.' 'Đây là một lệnh xấu: Del C: \\*.*' Đầu ra mong đợi: Ngày mai tôi sẽ học các biến toàn cầu PHP. Đây là một lệnh xấu: del c: \*.*& Nbsp; Nhấp vào tôi để xem giải pháp Write a PHP script to display the following strings. Go to the editor 3. $ var = 'Hướng dẫn PHP'. Đặt biến này vào phần tiêu đề, thẻ H3 và dưới dạng văn bản neo trong tài liệu HTML. Chuyển đến đầu ra mẫu biên tập: $var = 'PHP Tutorial'. Put this variable into the title section, h3 tag and as an anchor text within an HTML document. Go to the editor PHP Hướng dẫn PHP, một từ viết tắt của bộ tiền xử lý siêu văn bản, là một ngôn ngữ kịch bản đa năng nguồn
mở được sử dụng rộng rãi. Đây là một ngôn ngữ tập lệnh phía máy chủ được nhúng bằng HTML và đặc biệt phù hợp để phát triển web. Đi đến hướng dẫn PHP. 4. Tạo biểu mẫu HTML đơn giản và chấp nhận tên
người dùng và hiển thị tên thông qua câu lệnh PHP ECHO. Chuyển đến biên tập viên Create a simple HTML form and accept the user name and display the name through PHP echo statement. Go to the editor Đầu ra mẫu của dạng HTML:PHP BASIC [102 Bài tập với Giải pháp]
Click me to see the solution
Sample String :
'Tomorrow I \'ll learn PHP global variables.'
'This is a bad command : del c:\\*.*'
Expected Output :
Tomorrow I 'll learn PHP global variables.
This is a
bad command : del c:\*.*
Click me to see the solution
Sample Output :
PHP, an acronym for Hypertext Preprocessor, is a widely-used open source general-purpose scripting language. It is a cross-platform, HTML embedded server-side scripting language and is especially suited for web development.
Go to the PHP Tutorial.
Nhấp vào tôi để xem giải pháp
5. Viết tập lệnh PHP để lấy địa chỉ IP của máy khách. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script
to get the client IP address. Go to the editor
Click me to see the solution
6. Viết tập lệnh phát hiện trình duyệt PHP đơn giản. Chuyển đến đầu ra mẫu biên tập: Tác nhân người dùng của bạn là: Mozilla/5.0 [Windows NT 6.1] AppleWebKit/537.36 [Khtml, như Gecko] Chrome/35.0.1916.114 Safari/537.36 Nhấp vào tôi để xem giải pháp Write a simple PHP browser detection script. Go to the editor
Sample Output : Your User-Agent is: Mozilla/5.0 [Windows NT 6.1]
AppleWebKit/537.36 [KHTML, like Gecko] Chrome/35.0.1916.114 Safari/537.36
Click me to see the solution
7. Viết tập lệnh PHP để lấy tên tệp hiện tại. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the current file name. Go to the editor
Click me to see the solution
8. Viết tập lệnh PHP, sẽ trả về các thành phần sau của URL '//www.w3resource.com/php-exercise/php-basic-exercise.php'. Chuyển đến biên tập viên Write a PHP script, which will return the following components of the url '//www.w3resource.com/php-exercises/php-basic-exercises.php'. Go to the editor
Danh sách các thành phần: Sơ đồ, máy chủ, đường dẫn đầu ra dự kiến: Sơ đồ: HTTP Host: www.w3resource.com Đường dẫn: /php- exercise/php-basic-exercise.php Nhấp vào tôi để xem giải pháp
Expected Output :
Scheme : http
Host : www.w3resource.com
Path : /php-exercises/php-basic-exercises.php
Click me to
see the solution
9. Viết tập lệnh PHP, thay đổi màu của ký tự đầu tiên của một từ. Chuyển đến chuỗi mẫu biên tập Write a PHP script, which changes the color of the first character of a word. Go to the editor
Sample string : PHP Tutorial
Expected Output :
PHP Tutorial
Click me to see the solution
10. Viết tập lệnh PHP, để kiểm tra xem trang có được gọi từ 'https' hoặc 'http' hay không. Chuyển đến biên tập viên
Nhấp vào tôi để xem giải pháp Write a PHP script, to check whether the page is called from 'https' or 'http'. Go to the editor
Click me to see the solution
11. Viết tập lệnh PHP để chuyển hướng người dùng đến một trang khác. Chuyển đến trình soạn thảo đầu ra dự kiến: Chuyển hướng người dùng đến //www.w3resource.com/ Nhấp vào tôi để xem giải pháp Write a PHP script to redirect a user to a different page . Go to the editor
Expected output : Redirect
the user to //www.w3resource.com/
Click me to see the solution
12. Viết một chương trình PHP đơn giản để kiểm tra xem email có hợp lệ không. Chuyển đến Gợi ý của Trình chỉnh sửa: Sử dụng Bộ lọc Filter_Validate_Email xác thực giá trị làm địa chỉ e-mail. Lưu ý: Tài liệu PHP không nói rằng Filter_Validate_Email sẽ vượt qua RFC5321. Nhấp vào tôi để xem giải pháp Write a simple PHP program to check that emails are valid. Go to the editor
Hints : Use
FILTER_VALIDATE_EMAIL filter that validates value as an e-mail address.
Note : The PHP documentation does not say that FILTER_VALIDATE_EMAIL should pass the RFC5321.
Click me to see the solution
13. Viết tập lệnh Php E để hiển thị chuỗi, các giá trị trong bảng. Chuyển đến trình soạn thảo Lưu ý: Sử dụng các phần tử bảng HTML vào Echo. Đầu ra mong đợi: Nhấp vào tôi để xem giải pháp Write a e PHP script to display string, values within a table. Go to the editor
Note : Use HTML table elements into echo.
Expected Output :
Click me to see the solution
14. Viết tập lệnh PHP để hiển thị mã nguồn của trang web [ví dụ: "//www.example.com/"]. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to display source code of a webpage [e.g. "//www.example.com/"]. Go to the
editor
Click me to see the solution
15. Viết tập lệnh PHP để có được thông tin được sửa đổi cuối cùng của một tệp. Truy cập mẫu tệp biên tập: Php-basic-tập thể dục. Write a PHP script to get last modified information of a file. Go to the editor
Sample filename : php-basic-exercises.php
Sample Output : Last modified Monday, 26th June, 2017, 12:43pm
Click me to see the solution
16. Viết tập lệnh PHP vào số lượng dòng trong một tệp. Lưu ý: Lưu
trữ tên tệp văn bản vào một biến và đếm số dòng văn bản mà nó có. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to count number of lines in a file.
Note : Store a text file name into a variable and count the number of lines of text it has. Go to the editor
Click me to see the solution
17. Viết tập lệnh PHP để in phiên bản PHP hiện tại. Chuyển đến trình soạn thảo Lưu ý: Không sử dụng hàm phpinfo []. Nhấp vào tôi để xem giải pháp
Write a PHP script to print current PHP version. Go to the editor
Note : Do not use phpinfo[] function.
Click me to see the solution
18. Viết tập lệnh PHP để trì hoãn việc thực hiện chương trình trong số giây nhất định. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to delay the program execution for the given number of seconds. Go to the editor
Click me to see the solution
19. Hoạt động số học trên các biến ký tự: $ d
= 'a00'. Sử dụng biến này in các số sau. Chuyển đến đầu ra mẫu biên tập: A01 A02 A03 A04 A05 Nhấp vào tôi để xem giải pháp Arithmetic operations on character variables : $d = 'A00'. Using this variable print the following numbers. Go to the editor
Sample Output :
A01
A02
A03
A04
A05
Click me to see the solution
20. Viết tập lệnh PHP để có lỗi xảy ra cuối cùng. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to
get the last occurred error. Go to the editor
Click me to see the solution
21. Viết hàm PHP để kiểm tra xem một số lớn hơn 30, 20 hoặc 10 bằng toán tử ternary. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP function to test whether a number is greater than 30, 20 or 10 using ternary operator. Go to the editor
Click me to see the solution
22. Viết tập lệnh PHP để lấy URL đầy đủ. Chuyển đến biên tập viên Nhấp vào tôi để xem giải
pháp Write a PHP script to get the full URL. Go to the editor
Click me to see the solution
23. Viết tập lệnh PHP để so sánh phiên bản PHP. Chuyển đến trình soạn thảo Lưu ý: Sử dụng chức năng Phiên bản_compare [] và hằng số PHP_Version. Nhấp vào tôi để xem giải pháp Write a PHP script to compare the PHP version. Go to the editor
Note : Use version_compare[] function and PHP_VERSION constant.
Click me to see the solution
24. Viết tập lệnh
PHP để lấy tên của chủ sở hữu tập lệnh PHP hiện tại. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the name of the owner of the current PHP script. Go to the editor
Click me to see the solution
25. Viết tập lệnh PHP để lấy thư mục gốc tài liệu theo đó tập lệnh hiện tại được thực thi, như được định nghĩa trong tệp cấu hình của máy chủ. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the
document root directory under which the current script is executing, as defined in the server's configuration file. Go to the editor
Click me to see the solution
26. Viết tập lệnh PHP để lấy thông tin về hệ điều hành PHP đang chạy. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the information about the operating system PHP is running on. Go to the editor
Click me to see the solution
27. Viết tập lệnh PHP để in ra tất
cả các khoản tín dụng cho PHP. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to print out all the credits for PHP. Go to the editor
Click me to see the solution
28. Viết tập lệnh PHP để lấy đường dẫn thư mục được sử dụng cho các tệp tạm thời. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP script to get the directory path used for temporary files. Go to the editor
Click me to see the solution
29.
Viết tập lệnh PHP để lấy tên của các hàm của mô -đun. Truy cập Biên tập LƯU Ý: Tìm chức năng XML, JSON, v.v. Nhấp vào tôi để xem giải pháp Write a PHP script to get the names of the functions of a module. Go to the editor
Note : Find XML, JSON functions etc.
Click me to see the solution
30. Write a PHP script to get the time of the last modification of the current page Go to the editor
Click me to see the solution
31. Viết chương trình
PHP để trao đổi hai biến. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to swap two variables. Go to the editor
Click me to see the solution
32. Viết chương trình PHP để kiểm tra xem một số có phải là số Armstrong hay không. Trả về đúng nếu số là Armstrong khác trả về sai. Chuyển đến Lưu ý biên tập: Một số ba chữ số của Armstrong là một số nguyên sao cho tổng của các khối của các chữ số của nó bằng với chính số. Ví dụ: 153 là số Armstrong
vì 1 ** 3 + 5 ** 3 + 3 ** 3 = 153 Nhấp vào tôi để xem giải pháp Write a PHP program to check whether a number is an Armstrong number or not. Return true if the number is Armstrong otherwise return false. Go to the editor
Note: An Armstrong number of three digits is an integer so that the sum of the cubes of its digits is equal to the number itself. For example, 153 is an Armstrong number since 1**3 + 5**3 + 3**3 = 153
Click me to see the solution
33. Viết chương
trình PHP để chuyển đổi từ sang chữ số. Chuyển đến đầu vào của trình soạn thảo: Zero; ba; năm; sáu; tám; một đầu ra: 035681 Nhấp vào tôi để xem giải pháp Write a PHP program to convert word to digit. Go to the editor
Input: zero;three;five;six;eight;one
Output: 035681
Click me to see the solution
34. Viết chương trình PHP để kiểm tra các bit của hai vị trí đã cho của một số là giống nhau hay không. Chuyển đến trình soạn thảo 112 -> 01110000 Kiểm tra kết quả
vị trí thứ 2 và thứ 3: Kiểm tra thực sự thứ 4 và thứ 5 Kết quả: Sai Nhấp vào tôi để xem giải pháp Write a PHP program to check the bits of the two given positions of a number are same or not. Go to the editor
112 - > 01110000
Test 2nd and 3rd position
Result: True
Test 4th and 5th position
Result: False
Click me to see the solution
35. Viết chương trình PHP để xóa các bản sao khỏi danh sách được sắp xếp. Chuyển đến đầu vào của trình soạn thảo:
[1,1,2,2,3,4,5,5] Đầu ra: [1,2,3,4,5] Nhấp vào tôi để xem giải pháp Write a PHP program to remove duplicates from a sorted list. Go to the editor
Input: [1,1,2,2,3,4,5,5]
Output: [1,2,3,4,5]
Click me to see the solution
36. Viết chương trình PHP để kiểm tra nếu một chuỗi đã cho xảy ra ở cuối chuỗi khác. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to test if a given string occurs at the end of another given string. Go to
the editor
Click me to see the solution
37. 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 và tổng của tất cả các số này là 1060. Nhấp vào tôi để xem giải pháp Write a PHP program to compute the sum of the prime numbers less than 100. Go to the editor
Note: There are 25 prime numbers are there in less than 100.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 and sum of all these numbers is
1060.
Click me to see the solution
38. Viết chương trình PHP để hợp lệ một địa chỉ email. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to valid an email address. Go to the editor
Click me to see the solution
39. Viết chương trình PHP để có được kích thước của một tệp. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to get the size of a file. Go to the editor
Click me to see the
solution
40. Viết chương trình PHP để tính toán mod của hai số nguyên đã cho mà không sử dụng bất kỳ toán tử mô đun sẵn nào. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to calculate the mod of two given integers without using any inbuilt modulus operator. Go to the editor
Click me to see the solution
41. Viết chương trình PHP để in ra bảng nhân lên đến 6*6. Chuyển đến đầu ra của trình soạn thảo: Write a PHP program
to print out the multiplication table upto 6*6. Go to the editor
Output:
1 2 3 4 5 6 2 4 6 8 10 12 3 6 9 12 15 18 4 8 12 16 20 24 5 10 15 20 25 30 6 12 18 24 30 36Nhấp vào tôi để xem giải pháp
42. Viết chương trình PHP để tìm ký tự không lặp lại đầu tiên trong một chuỗi nhất định. Chuyển đến đầu vào của trình soạn thảo: Đầu ra màu xanh lá cây: G Đầu vào: ABCDEA Đầu ra: B Nhấp vào tôi để xem giải pháp Write a PHP program to find the first non-repeated character in a given string. Go to the editor
Input: Green
Output: G
Input: abcdea
Output: b
Click me to see the solution
43. Viết một chương trình PHP nhân các yếu tố tương ứng của hai danh sách đã cho. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program that multiplies corresponding elements of two given lists. Go to the editor
Click me to see the solution
44. Viết chương trình PHP để in tổng các cặp số của một mảng số nguyên dương nhất định bằng một số nhất định. Chuyển đến biên tập viên Nhấp vào tôi để xem
giải pháp Write a PHP program to print out the sum of pairs of numbers of a given sorted array of positive integers which is equal to a given number. Go to the editor
Click me to see the solution
45. Viết chương trình PHP để tính tổng số các chữ số của một số. Chuyển đến biên tập viên Nhấp vào tôi để xem giải pháp Write a PHP program to compute the sum of the digits of a number. Go to the editor
Click me to see the solution
46. Viết một
chương trình PHP để tìm chiều cao của ba tòa nhà hàng đầu theo thứ tự giảm dần từ tám tòa nhà đã cho. Chuyển đến EditorInput: 0 = chiều cao của tòa nhà [số nguyên] = 10.000 đầu ra: Write a PHP program to find heights of the top three building in descending order from eight given buildings. Go to the editor
Input:
0 = height of building [integer] = 10,000
Output:
Heights of the top three buildings: 45 25 24Nhấp vào tôi để xem giải pháp
47. Viết chương trình PHP để tính toán số chữ
số của tổng số hai số nguyên đã cho. Chuyển đến EditorInput: Mỗi trường hợp thử nghiệm bao gồm hai số nguyên không âm X và Y được phân tách bằng một không gian trong một dòng. 0 = x, y = 1.000.000 đầu ra: Write a PHP program to compute the digit number of sum of two given integers. Go to the editor
Input:
Each test case consists of two non-negative integers x and y which are separated by a space in a line.
0 = x, y = 1,000,000
Output:
Digit number of sum of two given integers: 2Nhấp vào tôi để xem giải pháp
48. Viết một chương trình PHP để kiểm tra xem ba độ dài [số nguyên] đã cho của ba bên tạo thành một tam giác vuông. In "Có" nếu các cạnh đã cho tạo thành một tam giác vuông nếu không in "Không". Chuyển đến EditorInput: Các số nguyên được phân tách bằng một không gian. 1 = chiều dài của bên = 1.000 đầu ra: Write a PHP program to check whether three given lengths [integers] of three sides form a right triangle. Print "Yes" if the given sides form a right
triangle otherwise print "No". Go to the editor
Input:
Integers separated by a single space.
1 = length of the side = 1,000
Output:
YESNhấp vào tôi để xem giải pháp
49. Viết chương trình PHP để giải phương trình: Truy cập trình soạn thảo ax+by = c dx+ey = f in các giá trị của x, y trong đó a, b, c, d, e và f được đưa ra. , B, C, D, E, F được phân tách bằng một không gian duy nhất. [-1.000 = A, B, C, D, E, F = 1.000] Đầu ra: Write a PHP
program which solve the equation: Go to the editor
ax+by=c
dx+ey=f
Print the values of x, y where a, b, c, d, e and f are given.
Input:
a,b,c,d,e,f separated by a single space.
[-1,000 = a,b,c,d,e,f = 1,000]
Output:
Values of x and y: -1.684 2.737Nhấp vào tôi để xem giải pháp
50. Viết chương trình PHP để tính số tiền nợ trong n tháng. Số tiền vay là 100.000 đô la và khoản vay tăng thêm 5% tiền lãi của khoản nợ và làm tròn nó vào 1.000 gần nhất theo tháng.
Chuyển đến EditorInput: Một số nguyên n [0 = n = 100]. Đầu ra: Write a PHP program to compute the amount of the debt in n months. The borrowing amount is $100,000 and the loan adds 5% interest of the debt and rounds it to the nearest 1,000 above month by month. Go to the editor
Input:
An integer n [0 = n = 100] .
Output:
Amount of debt: 137000Click me to see the solution
51. Write a PHP program which reads an integer n and find the number of
combinations. of a,b,c and d [0 ≤ a,b,c,d ≤ 9] where [a + b + c + d] will be equal to n. Go to the editor
Input:
n [1 = n = 50]
Output:
Number of combinations of a,b,c and d: 56Click me to see the solution
52. Write a PHP program to print the number of prime numbers which are less than or equal to a given integer. Go to the editor
Input:
n [1 = n = 999,999]
Output:
Number of prime numbers which are less than or equal to n: 618Click me to see the solution
53. Write a PHP
program to compute the radius and the central coordinate [x, y] of a circle which is constructed by three given points on the plane surface. Go to the editor
Input:
x1, y1, x2, y2, x3, y3 separated by a single space.
Output:
Central coordinate[x,y] and radius of the circle: [1.000 1.000] 1.414Click me to see the solution
54. Write a PHP program to compute and print sum of two given integers [more than or equal to zero]. If given integers or the sum have more than 80 digits, print "overflow". Go to the
editor
Output:
46 overflow overflow ... overflow overflowClick me to see the solution
55. Write a PHP program that accepts six numbers as input and sorts them in descending order. Go to the editor
Input: Input consists of six numbers n1, n2, n3, n4, n5, n6 [-100000 = n1, n2, n3, n4, n5, n6 = 100000]. The six numbers are separated by a space.
Output:
Heights of the top three buildings: 45 25 240 Click me to see the solution
56. Write a PHP program to test whether two lines PQ and RS are
parallel. Go to the editor
The four points are P[x1, y1], Q[x2, y2], R[x3, y3], S[x4, y4].
Input:
2
1.0 0.0 3.0 2.0 2.0 2.0 0.0 0.0
4.0 3.0 10.0 7.0 14.0 5.0 8.0 10.0
Output:
Heights of the top three buildings: 45 25 241 Click me to see the solution
57. Write a PHP program to find the maximum sum of a contiguous subsequence from a given sequence of numbers a1, a2, a3, ... an. A subsequence of one element is also a continuous subsequence. Go to the editor
You can
assume that 1 = n = 5000 and -100000 = ai = 100000.
Input numbers are separated by a space.
Input 0 to exit.
Sample Input:6
-4
-2
5
3
8
Sample Output:
Heights of the top three buildings: 45 25 242 Click me to see the solution
58. There are two circles C1 with radius r1, central coordinate [x1, y1] and C2 with radius r2 and central coordinate [x2, y2] Go to the editor
Input numbers [real numbers] are separated by a space.
Write a PHP program to test
the followings -
"C2 is in C1" if C2 is in C1
"C1 is in C2" if C1 is in C2
"Circumference of C1 and C2 intersect" if circumference of C1 and C2 intersect, and
"C1 and C2 do not overlap" if C1 and C2 do not overlap.
Sample Input:
2
0.0 0.0 6.0 0.0 0.0 5.0
0.0 0.0 3.0 5.1 0.0 3.0
Sample Output:
Heights of the top three buildings: 45 25 243 Click me to see the solution
59. Write a PHP program to that reads a date [from 2016/1/1 to 2016/12/31] and prints the
day of the date. Jan. 1, 2016, is Friday. Note that 2016 is a leap year. Go to the editor
Two integers m and d separated by a single space in a line, m ,d represent the month and the day.
Sample Input:
9 15
Sample Output:
Heights of the top three buildings: 45 25 244 Click me to see the solution
60. Write a PHP program to print mode values from a given a sequence of integers. The mode value is the element which occurs most frequently. If there are several mode values, print
them in ascending order. Go to the editor
A sequence of integer's ai [1 = ai = 100]. The number of integers is less than or equals to 100.
Sample Input:
6
7
4
6
9
8
6
4
10
8
4
5
Sample Output:
Heights of the top three buildings: 45 25 245 Click me to see the solution
61. Write a PHP program which reads a text [only alphabetical characters and spaces.] and prints two words. The first one is the word which is arise most frequently in
the text. The second one is the word which has the maximum number of letters. Go to the editor
Note: A word is a sequence of letters which is separated by the spaces.
Input:
A text is given in a line with following condition:
a. The number of letters in the text is less than or equal to 1000.
b. The number of letters in a word is less than or equal to 32.
c. There is only one word which is arise most frequently in given text.
d. There is only one word
which has the maximum number of letters in given text. Sample Input:Thank you for your comment and your participation.
Sample Output:
Heights of the top three buildings: 45 25 246 Click me to see the solution
62. Write a PHP program which reads the two adjoined sides and the diagonal of a parallelogram and check whether the parallelogram is a rectangle or a rhombus. Go to the editor
According to Wikipedia-
parallelograms: In Euclidean geometry, a parallelogram is a simple
[non-self-intersecting] quadrilateral with two pairs of parallel sides. The opposite or facing sides of a parallelogram are of equal length and the opposite angles of a parallelogram are of equal measure.
rectangles: In Euclidean plane geometry, a rectangle is a quadrilateral with four right angles. It can also be defined as an equiangular quadrilateral, since equiangular means that all of its angles are equal [360o/4 = 90o]. It can also be defined as a parallelogram containing a right
angle.
rhombus: In plane Euclidean geometry, a rhombus [plural rhombi or rhombuses] is a simple [non-self-intersecting] quadrilateral whose four sides all have the same length. Another name is equilateral quadrilateral, since equilateral means that all of its sides are equal in length. The rhombus is often called a diamond, after the diamonds suit in playing cards which resembles the projection of an octahedral diamond, or a lozenge, though the former sometimes refers specifically to a
rhombus with a 60o angle [see Polyiamond], and the latter sometimes refers specifically to a rhombus with a 45o angle.
Input:Two adjoined sides and the diagonal.
1 = ai, bi, ci = 1000, ai + bi > ci
Sample Input:
4,5,6
6,6,9
Sample Output:
Heights of the top three buildings: 45 25 247 Nhấp vào tôi để xem giải pháp
63. Viết chương trình PHP để thay thế một chuỗi "Python" bằng "PHP" và "Python" bằng "PHP" trong một chuỗi nhất định. Truy cập EditorInput: Các chữ
cái tiếng Anh [bao gồm các ký tự chữ và số byte, khoảng trống, ký hiệu] được đưa ra trên một dòng. Độ dài của chuỗi ký tự đầu vào là 1000 hoặc ít hơn. Đầu vào mẫu: PHP phổ biến so với đầu ra mẫu Python: Write a PHP program to replace a string "Python" with "PHP" and "Python" with "PHP" in a given string. Go to the editor
Input:English letters [including single byte alphanumeric characters, blanks, symbols] are given on one line. The length of the input character
string is 1000 or less.
Sample Input:
PHP is popular than Python
Sample Output:
Heights of the top three buildings: 45 25 248 Nhấp vào tôi để xem giải pháp
64. Giữa số nguyên lớn nhất và số nguyên nhỏ nhất. Đầu vào mẫu: 1 34567829 Đầu ra mẫu: Write a PHP program to find the difference between the largest integer and the smallest integer which are created by 8 numbers from 0 to 9. The number that can be rearranged shall start with 0 as in 00135668. Go to the editor
Input: The difference between the largest integer and the smallest integer.
Sample Input:
1
34567829
Sample Output:
Heights of the top three buildings: 45 25 249 Nhấp vào tôi để xem giải pháp
65. Viết một chương trình PHP để tính tổng của N đã cho số nguyên tố đầu tiên. Chuyển đến EditorInput: N [n = 10000]. Đầu vào 0 để thoát chương trình. Mẫu đầu vào: 25 0 Đầu ra mẫu: Write a PHP program to compute the sum of first n given prime numbers. Go to the editor
Input: n [ n = 10000]. Input 0 to exit the program.
Sample Input:
25
0
Sample Output:
Digit number of sum of two given integers: 20 Nhấp vào tôi để xem giải pháp
66. Viết chương trình PHP chấp nhận số chẵn [n phải lớn hơn hoặc bằng 4 và nhỏ hơn hoặc bằng 50000, số Goldbach] từ người dùng và tạo một kết hợp thể hiện số đã cho là tổng của hai số nguyên tố số. In số lượng kết hợp. Truy cập số biên tập viên Goldbach: Số Goldbach là một số nguyên tích cực có thể được thể
hiện dưới dạng tổng của hai số nguyên tố lẻ. [4] Vì bốn là số thậm chí duy nhất lớn hơn hai con yêu cầu Prime 2 để được viết dưới dạng tổng của hai số nguyên tố, một hình thức khác của tuyên bố phỏng đoán của Goldbach là tất cả các số nguyên lớn hơn 4 là số Goldbach. Biểu thức của một số chẵn được cho là tổng của hai số nguyên tố được gọi là phân vùng Goldbach của số đó. Sau đây là các ví dụ về phân vùng GoldBach cho một số số chẵn: 6 = 3 + 3 8 = 3 + 5 10 = 3 + 7 = 5 + 5 12 = 7 + 5 ... 100 = 3 +
97 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53 Đầu vào mẫu: 100 0 Đầu ra mẫu: Write a PHP program that accept an even number [n should be greater than or equal to 4 and less than or equal to 50000, Goldbach number] from the user and create a combinations that express the given number as a sum of two prime numbers. Print the number of combinations. Go to the editor
Goldbach number: A Goldbach number is a positive even integer that can be expressed as the sum of two odd
primes.[4] Since four is the only even number greater than two that requires the even prime 2 in order to be written as the sum of two primes, another form of the statement of Goldbach's conjecture is that all even integers greater than 4 are Goldbach numbers.
The expression of a given even number as a sum of two primes is called a Goldbach partition of that number. The following are examples of Goldbach partitions for some even numbers:
6 = 3 + 3
8 = 3 + 5
10 = 3 + 7 = 5 + 5
12 = 7 + 5
...
100 = 3 + 97 = 11 + 89 = 17 + 83 = 29 + 71 = 41 + 59 = 47 + 53
Sample Input:
100
0
Sample Output:
Digit number of sum of two given integers: 21 Nhấp vào tôi để xem giải pháp
67. Nếu bạn vẽ một đường thẳng trên mặt phẳng, mặt phẳng được chia thành hai vùng. Ví dụ: nếu bạn kéo hai đường thẳng song song, bạn sẽ nhận được ba khu vực và nếu bạn vẽ theo chiều dọc này sang bên kia, bạn sẽ nhận được 4 khu vực. Viết một chương trình PHP để tạo số lượng vùng tối đa thu
được bằng cách vẽ n cho các đường thẳng. Chuyển đến EditorInput: [1 = n = 10.000] Đầu vào mẫu: 5 đầu ra mẫu: if you draw a straight line on a plane, the plane is divided into two regions. For example, if you pull two straight lines in parallel, you get three areas, and if you draw vertically one to the other you get 4 areas. Write a PHP program to create maximum number of regions obtained by drawing n given straight lines. Go to the editor
Input: [1 = n = 10,000]
Sample Input:
5
Sample Output:
Digit number of sum of two given integers: 22 Nhấp vào tôi để xem giải pháp
68. Có bốn điểm khác nhau trên mặt phẳng, P [XP, YP], Q [XQ, YQ], R [XR, YR] và S [XS, YS]. Viết một chương trình PHP để kiểm tra xem AB và CD có trực giao hay không. Chuyển đến trình soạn thảo XP, YP, XQ, YQ, XR, YR, XS và YS lần lượt là -100 đến 100 và mỗi giá trị có thể lên tới 5 chữ số sau khi điểm thập phân được đưa ra dưới dạng số thực bao gồm số lượng. Đầu vào mẫu: 5 đầu ra
mẫu: There are four different points on a plane, P[xp,yp], Q[xq, yq], R[xr, yr] and S[xs, ys]. Write a PHP program to test whether AB and CD are orthogonal or not. Go to the editor
xp,yp, xq, yq, xr, yr, xs and ys are -100 to 100 respectively and each value can be up to 5 digits after the decimal point It is given as a real number including the number of.
Sample Input:
5
Sample Output:
Digit number of sum of two given integers: 22 Nhấp vào tôi để xem giải pháp
68. Có bốn điểm
khác nhau trên mặt phẳng, P [XP, YP], Q [XQ, YQ], R [XR, YR] và S [XS, YS]. Viết một chương trình PHP để kiểm tra xem AB và CD có trực giao hay không. Chuyển đến trình soạn thảo XP, YP, XQ, YQ, XR, YR, XS và YS lần lượt là -100 đến 100 và mỗi giá trị có thể lên tới 5 chữ số sau khi điểm thập phân được đưa ra dưới dạng số thực bao gồm số lượng. Đầu vào mẫu: 5 đầu ra mẫu: Write a PHP program to sum of all numerical values [positive integers] embedded in a sentence. Go to the editor
Sentences with positive integers are given over multiple lines. Each line is a character string containing one-byte alphanumeric characters, symbols, spaces, or an empty line. However the input is 80 characters or less per line and the sum is 10,000 or less.
Sample Input:
5 apple and 10 orange are rotten in the basket
Sample Output:
Digit number of sum of two given integers: 22 Nhấp vào tôi để xem giải pháp
68. Có bốn điểm khác nhau trên mặt phẳng, P [XP, YP], Q [XQ, YQ], R [XR, YR] và S
[XS, YS]. Viết một chương trình PHP để kiểm tra xem AB và CD có trực giao hay không. Chuyển đến trình soạn thảo XP, YP, XQ, YQ, XR, YR, XS và YS lần lượt là -100 đến 100 và mỗi giá trị có thể lên tới 5 chữ số sau khi điểm thập phân được đưa ra dưới dạng số thực bao gồm số lượng. Đầu vào mẫu: 5 đầu ra mẫu: Record section of ABC company records the customer number and the trading date for each month. Write a PHP program to find the customer number that has traded for the second
consecutive for the second consecutive month from last month and the number of transactions. Go to the editor
The data of this month and the data of last month are separated by a blank line of one line and given.
Transaction format:
c1 , d1
c2 , d2
...
...
ci [1 = ci = 1,000] is an integer represents the customer number, di [1 = di = 31] is an integer represents the trading date.
Sample Input:
125,10
55,12
34,14
69. Viết một
chương trình PHP để tổng của tất cả các giá trị số [số nguyên dương] được nhúng trong một câu. Chuyển đến các câu biên tập với số nguyên dương được đưa ra trên nhiều dòng. Mỗi dòng là một chuỗi ký tự chứa các ký tự chữ và số một byte, ký hiệu, khoảng trắng hoặc một dòng trống. Tuy nhiên, đầu vào là 80 ký tự hoặc ít hơn trên mỗi dòng và tổng là 10.000 hoặc ít hơn. Mẫu đầu vào: 5 Apple và 10 Orange bị thối trong đầu ra mẫu giỏ:
55,4
125,5
Sample Output:
125,3 55,4 125,5 đầu ra mẫu: There are 10 vertical and horizontal squares on a plane. Each square is painted blue and green. Blue represents the sea, and green represents the land. When two green squares are in contact with the top and bottom, or right and left, they are said to be ground. The area created by only one green square is called "island". For example, there are five islands in the figure below.
Write a PHP program to
read the mass data and find the number of islands. Go to the editor
A single data set is represented by 10 rows of 10 numbers representing green squares as 1 and blue squares as zeros.
Sample Input:
1100000111
1000000111
0000000111
0010001000
0000011100
0000111110
0001111111
1000111110
1100011100
1110001000
Sample Output:
Digit number of sum of two given integers: 26 Nhấp vào tôi để xem giải pháp
72. Khi ký tự liên tiếp trong một chuỗi, có thể rút
ngắn chuỗi ký tự bằng cách thay thế ký tự bằng một quy tắc nhất định. Ví dụ, trong trường hợp chuỗi ký tự yyyyy, nếu nó được biểu thị là # 5 y, nó sẽ được nén bởi một ký tự. Viết chương trình PHP để khôi phục chuỗi gốc bằng cách nhập chuỗi nén với quy tắc này. Tuy nhiên, ký tự # không xuất hiện trong chuỗi ký tự được khôi phục. Truy cập Lưu ý biên tập: Các câu gốc là chữ hoa, chữ thường, số, ký hiệu, ít hơn 100 chữ cái và các chữ cái liên tiếp không quá 9 chữ cái. Đầu vào: Nhiều chuỗi ký tự được
đưa ra. Một chuỗi được đưa ra cho mỗi dòng đầu ra mẫu: When character are consecutive in a string , it is possible to shorten the character string by replacing the character with a certain rule. For example, in the case of the character string YYYYY, if it is expressed as # 5 Y, it is compressed by one character.
Write a PHP program to restore the original string by entering the compressed string with this rule. However, the # character does not appear in the restored character
string. Go to the editor
Note: The original sentences are uppercase letters, lowercase letters, numbers, symbols, less than 100 letters, and consecutive letters are not more than 9 letters.
Input:
Multiple character strings are given. One string is given per line
Sample Output:
Digit number of sum of two given integers: 27 Nhấp vào tôi để xem giải pháp
73. Một đa giác lồi là một đa giác đơn giản trong đó không có phân đoạn đường giữa hai điểm trên ranh giới từng đi ra ngoài đa giác.
Tương tự, nó là một đa giác đơn giản có nội thất là một bộ lồi. Trong một đa giác lồi, tất cả các góc bên trong nhỏ hơn hoặc bằng 180 độ, trong khi trong một đa giác lồi nghiêm ngặt, tất cả các góc bên trong đều nhỏ hơn 180 độ. Viết một chương trình PHP tính toán khu vực của đa giác. Các đỉnh có tên đỉnh 1, đỉnh 2, đỉnh 3, ... đỉnh n theo thứ tự kết nối cạnh. Tuy nhiên, N là 3 hoặc hơn và 20 hoặc ít hơn. Bạn cũng có thể sử dụng công thức sau để tính diện tích S từ độ dài A, B và C của ba cạnh
của tam giác. Chuyển đến EditorInput: 1.0, 0,0 0,0, 0,0 1.0, 1.0 2.0, 0,0 -1.0, 1.0 đầu ra mẫu: A convex polygon is a simple polygon in which no line segment between two points on the boundary ever goes outside the polygon. Equivalently, it is a simple polygon whose interior is a convex set. In a convex polygon, all interior angles are less than or equal to 180 degrees, while in a strictly convex polygon all interior angles are strictly less than 180 degrees.
Write a PHP program
that compute the area of the polygon . The vertices have the names vertex 1, vertex 2, vertex 3, ... vertex n according to the order of edge connections. However, n is 3 or more and 20 or less. You can also use the following formula to calculate the area S from the lengths a, b, and c of the triangle's three sides.
Go to the editor
Input:
1.0, 0.0
0.0, 0.0
1.0, 1.0
2.0, 0.0
-1.0, 1.0
Sample Output:
Digit number of sum of two given integers: 28 Nhấp vào tôi để xem giải pháp
74.
Gã khổng lồ công cụ tìm kiếm Internet, chẳng hạn như Google chấp nhận các trang web trên toàn thế giới và phân loại chúng, tạo ra một cơ sở dữ liệu khổng lồ. Các công cụ tìm kiếm cũng phân tích các từ khóa tìm kiếm được người dùng nhập và tạo các yêu cầu cho tìm kiếm cơ sở dữ liệu. Trong cả hai trường hợp, việc xử lý phức tạp được thực hiện để nhận ra việc truy xuất hiệu quả, nhưng tất cả các điều cơ bản đều cắt bỏ các từ từ các câu. Viết một chương trình PHP để cắt các từ có độ dài từ 3 đến 6
ký tự từ một câu nhất định không quá 1024 ký tự. Truy cập EditorInput: Các câu tiếng Anh bao gồm các dấu phân cách và ký tự chữ và số được đưa ra trên một dòng. Đầu vào mẫu: Đầu ra mẫu Fox Fox nhanh: Đầu ra: Internet search engine giant, such as Google accepts web pages around the world and classify them, creating a huge database. The search engines also analyze the search keywords entered by the user and create inquiries for database search. In both cases, complicated processing is
carried out in order to realize efficient retrieval, but basics are all cutting out words from sentences.
Write a PHP program to cut out words of 3 to 6 characters length from a given sentence not more than 1024 characters. Go to the editor
Input:
English sentences consisting of delimiters and alphanumeric characters are given on one line.
Sample Input:
The quick brown fox
Sample Output:
Digit number of sum of two given integers: 29 Nhấp vào tôi để xem giải pháp
7.
Viết một chương trình PHP tính giá trị tối đa của tổng số nguyên truyền. Truy cập EditorInput: Một loạt các số nguyên được phân tách bằng dấu phẩy được đưa ra trong kim cương. Không có không gian được bao gồm trong mỗi dòng. Ví dụ đầu vào tương ứng với Hình 1. Số lượng dòng dữ liệu nhỏ hơn 100 dòng. Mẫu đầu vào: 8 4, 9 9, 2, 1 3, 8, 5, 5 5, 6, 3, 7, 6 3, 8, 5, 5 9, 2, 1 4, 9 8 Đầu ra mẫu: Arrange integers [0 to 99] as narrow hilltop, as illustrated in Figure 1. Reading such data
representing huge, when starting from the top and proceeding according to the next rule to the bottom. Write a PHP program that compute the maximum value of the sum of the passing integers. Go to the editor
Input:
A series of integers separated by commas are given in diamonds. No spaces are included in each line. The input example corresponds to Figure 1. The number of lines of data is less than 100 lines.
Sample Input:
8
4, 9
9, 2, 1
3, 8, 5, 5
5, 6, 3, 7, 6
3, 8, 5, 5
9, 2, 1
4, 9
8
Sample Output:
YES0 Nhấp vào tôi để xem giải pháp
76. Nhiệm vụ của bạn là phát triển một phần nhỏ của phần mềm bảng tính. Viết một chương trình PHP thêm các cột và hàng của bảng đã cho như trong hình sau: Truy cập EditorInput: N [kích thước của hàng và cột của bảng đã cho] Hàng thứ 1 của Bảng thứ 2 của bảng :: Hàng n của bảng Đầu vào kết thúc bằng một dòng bao gồm một 0.s Mample đầu vào: 4 25 69 51 26 68
35 29 54 54 57 45 63 61 68 47 59 0 Đầu ra mẫu: Your task is to develop a small part of spreadsheet software.
Write a PHP program which adds up columns and rows of given table as shown in the following figure: Go to the editor
Input:
n [the size of row and column of the given table]
1st row of the table
2nd row of the table
:
:
n th row of the table
The input ends with a line consisting of a single 0.
Sample
Input:
4
25 69 51 26
68 35 29 54
54 57 45 63
61 68 47 59
0
Sample Output:
YES1 Nhấp vào tôi để xem giải pháp
77. Viết chương trình PHP đọc danh sách các cặp từ và số trang, và in từ và danh sách các số trang tương ứng. Truy cập trình chỉnh sửa Số lượng các cặp từ và số trang nhỏ hơn hoặc bằng 1000. Một từ không bao giờ xuất hiện trong một trang nhiều hơn một lần. Các từ phải được in theo thứ tự bảng chữ cái và các số trang phải được in theo
thứ tự tăng dần. Mẫu đầu vào: Apple 5 Chuối 6 Đầu ra mẫu: Write a PHP program which reads a list of pairs of a word and a page number, and prints the word and a list of the corresponding page numbers. Go to the editor
The number of pairs of a word and a page number is less than or equal to 1000. A word never appear in a page more than once. The words should be printed in alphabetical order and the page numbers should be printed in ascending order.
Sample
Input:
apple 5
banana 6
Sample Output:
YES2 Nhấp vào tôi để xem giải pháp
78. Viết một chương trình PHP để tạo một hàm trả về đúng cho tất cả các phần tử của một mảng, sai nếu không. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to create a function that returns true for all elements of an array, false otherwise. Go to the editor
Sample Output:
YES3 Nhấp vào tôi để xem giải pháp
79. Viết một chương trình PHP để làm phẳng
sâu một mảng đã cho. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to deep flatten an given array. Go to the editor
Sample Output:
YES4 Nhấp vào tôi để xem giải pháp
80. Viết một chương trình PHP để tạo & nbsp; Một mảng mới với n phần tử được loại bỏ khỏi bên trái. Chuyển đến biên tập viênWrite a PHP program to create a new array with n elements removed from the left. Go to the editor
YES5 Nhấp vào tôi để xem giải pháp
81.
Viết chương trình PHP để có được phần tử cuối cùng mà hàm đã cho trả về giá trị sự thật. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to get the last element for which the given function returns a truth value. Go to the editor
Sample Output:
YES6 Nhấp vào tôi để xem giải pháp
82. Viết chương trình PHP để có được chỉ mục của phần tử cuối cùng mà hàm đã cho trả về giá trị sự thật. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to get the index of
the last element for which the given function returns a truth value. Go to the editor
Sample Output:
YES7 Nhấp vào tôi để xem giải pháp
83. Viết chương trình PHP để nhóm các yếu tố của một mảng dựa trên hàm đã cho. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to group the elements of an array based on the given function. Go to the editor
Sample Output:
YES8 Nhấp vào tôi để xem giải pháp
84. Viết chương trình PHP để kiểm tra danh sách
phẳng cho các giá trị trùng lặp. Trả về true nếu các giá trị trùng lặp tồn tại và sai nếu các giá trị là tất cả duy nhất. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to check a flat list for duplicate values. Returns true if duplicate values exists and false if values are all unique. Go to the editor
Sample Output:
YES9 Nhấp vào tôi để xem giải pháp
85. Viết một chương trình PHP để có được đầu của một danh sách nhất định. Chuyển đến đầu ra mẫu biên
tập: Write a PHP program to get the head of a given list. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7370 Nhấp vào tôi để xem giải pháp
86. Viết một chương trình PHP để có được yếu tố cuối cùng của một danh sách nhất định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to get the last element of a given list. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7371 Nhấp vào tôi để xem giải pháp
87. Viết chương trình PHP để truy xuất tất cả các giá trị cho một
khóa nhất định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to retrieve all of the values for a given key. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7372 Nhấp vào tôi để xem giải pháp
88. Viết chương trình PHP để biến đổi mảng gốc để lọc ra các giá trị được chỉ định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to mutate the original array to filter out the values specified. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7373 Nhấp vào tôi để xem giải pháp
89. Viết chương trình PHP để lọc bộ sưu tập bằng cách sử dụng cuộc gọi lại đã cho. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to filter the collection using the given callback. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7374 Nhấp vào tôi để xem giải pháp
90. Viết chương trình PHP để trả về tất cả các phần tử trong một mảng nhất định ngoại trừ chương trình đầu tiên. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to return all elements in a
given array except for the first one. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7375 Nhấp vào tôi để xem giải pháp
91. Viết một chương trình PHP để có được một mảng với các phần tử N được xóa từ đầu một mảng nhất định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to get an array with n elements removed from the beginning of a given array. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7376 Nhấp vào tôi để xem giải pháp
92. Viết chương trình PHP để lọc ra các
phần tử của một mảng đã cho, có một trong các giá trị được chỉ định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to filter out the elements of a given array, that have one of the specified values. Go to the editor
Sample Output:
Values of x and y: -1.684 2.7377 Nhấp vào tôi để xem giải pháp
93. Viết chương trình PHP để sắp xếp bộ sưu tập các mảng hoặc đối tượng đã cho theo khóa. Chuyển đến biên tập viên Write a PHP program to sort a collection of given arrays or objects by key. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to check if two numbers are approximately equal to each other. Go to the editor
Note: Use abs[] to compare the
absolute difference of the two values to epsilon. Omit the third parameter, epsilon, to use a default value of 0.001.
Đầu ra mẫu:
YES9 Nhấp vào tôi để xem giải pháp
85. Viết một chương trình PHP để có được đầu của một danh sách nhất định. Chuyển đến đầu ra mẫu biên tập: Write a PHP program to check if a given string starts with a given substring. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để
kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to count number of vowels in a given string. Go to the editor
Note: Use a regular expression to count the number of vowels [A, E, I, O, U] in a string.
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to decapitalize the first letter of the string and then adds it with rest of the string. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to create a new function that composes multiple functions into a single callable. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển
đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to memoize a given function results in memory. Go to the editor
Note: In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs
occur again.
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to curry a function to take arguments in multiple calls. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to call a given function only once. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001. Write a PHP program to capture a variable number of arguments to a given function. Go to the editor
Đầu ra mẫu:
Values of x and y: -1.684 2.7378 Nhấp vào tôi để xem giải pháp
94. Viết một chương trình PHP để kiểm tra xem hai số có xấp xỉ với nhau không. Chuyển đến trình soạn thảo Lưu ý: Sử dụng abs [] để so sánh sự khác biệt tuyệt đối của hai giá trị với epsilon. Bỏ qua tham số thứ ba, Epsilon, để sử dụng giá trị mặc định là 0,001.
95. Viết chương trình PHP để kiểm tra xem một chuỗi nhất định có bắt đầu bằng một chuỗi con nhất định không. Chuyển đến biên tập viên
Amount of debt: 1370000 Nhấp vào tôi để xem giải pháp