<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									PHP - Q&amp;A				            </title>
            <link>https://tutorials7.com/ko/qa/php/</link>
            <description>Tutorials7.com 미니 포럼</description>
            <language>ko-KR</language>
            <lastbuilddate>Thu, 05 Mar 2026 17:53:34 +0000</lastbuilddate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>로그인 - PHP(예제가 있는 작업)</title>
                        <link>https://tutorials7.com/ko/qa/php/login-php-task-with-examples/</link>
                        <pubdate>Tue, 05 Nov 2024 15:26:38 +0000</pubdate>
                        <description><![CDATA[You will be given a string representing a username. The password will be that username reversed. Until you receive the correct password print on the console &quot;Incorrect password. Try again.&quot;....]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>You will be given a string representing a username. The password will be that username reversed. Until you receive the correct password print on the console <strong>"Incorrect password. Try again."</strong>. When you receive the correct password print <strong>"User {username} logged in."</strong> However on the fourth try if the password is still not correct print <strong>"User {username} blocked!"</strong> and end the program.</p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/login-php-task.jpg" alt="login php task" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>eiorgert</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/login-php-task-with-examples/</guid>
                    </item>
				                    <item>
                        <title>삼각형의 숫자 - PHP 작업</title>
                        <link>https://tutorials7.com/ko/qa/php/triangle-of-numbers-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 15:11:39 +0000</pubdate>
                        <description><![CDATA[Write a program, which receives a number – n, and prints a triangle from 1 to n as in the examples.
Examples:]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>Write a program, which receives a number – <strong>n</strong>, and prints a triangle from <strong>1 to n</strong> as in the examples.</p>
<p><strong><span>Examples:</span></strong></p>
<p><img src="https://forum.tutorials7.com/images/php-task-triangle-of-numbers.jpg" alt="php task triangle of numbers" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>andrew</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/triangle-of-numbers-php-task/</guid>
                    </item>
				                    <item>
                        <title>Santa&#039;s Cookies - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/santas-cookies-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 15:10:03 +0000</pubdate>
                        <description><![CDATA[You need to make cookies for Santa and his dwarfs.
You will receive the amount of batches – n that you need to bake. For every batch you will receive ingredients:  flour, sugar and cocoa in...]]></description>
                        <content:encoded><![CDATA[<p>You need to make cookies for Santa and his dwarfs.</p>
<p>You will receive the amount of batches – n that you need to bake. For every batch you will receive ingredients:  flour, sugar and cocoa in grams, each on a new line. You need to calculate how many boxes of cookies you get for every batch with the given ingredients and total boxes of cookies for all batches. To calculate the number of boxes per batch you need to divide total cookies per bake by cookies per box (see the table below). To get the total cookies per bake use the following formula and round the result to the nearest lower number:  </p>
<p><strong>({cup} + {smallSpoon} + {bigSpoon}) * min from({flourCups}, {sugarSpoons}, {cocoaSpoons}) / singleCookieGrams</strong></p>
<p>To get the flourCups divide flour by cups.</p>
<p>To get the sugarSpoons divide sugar by bigSpoon.</p>
<p>And for the cocoaSpoons divide cocoa by smallSpoon.</p>
<p>The cups and the spoons must be integer numbers.</p>
<p><em>(see the table below)</em></p>
<p>If flourCups, sugarSpoons or cocoaSpoons for a single bake are not enough (&lt;=0), print the following message: <strong>"Ingredients are not enough for a box of cookies."</strong></p>
<p>Otherwise calculate the cookies and print the number of boxes you get for the current batch:<br /><strong>"Boxes of cookies: {boxes of cookies per current bake}"</strong></p>
<p><span><strong>Use the following table for calculations:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/santas-cookies-php-task.jpg" alt="santas cookies php task" /></p>
<p>When you finish baking, pack the all the cookies in boxes and send them to Santa and his dwarfs and print the total number of boxes on the console.</p>
<p><strong>"Total boxes: {totalBoxes for all bakes}"</strong></p>
<p><span><strong>Input:</strong></span><br />The input data should be read from the console. It will consist of:</p>
<ul>
<li>Amount of batches - integer  number in range </li>
</ul>
<p><strong>For every batch:</strong></p>
<ul>
<li>Amount of flour in grams – integer number in range </li>
<li>Amount of sugar in grams – integer number in range </li>
<li>Amount of cоcоа in grams – integer number in range </li>
</ul>
<p><br />The input data will always be valid and in the format described. There is no need to check it explicitly.</p>
<p><span><strong>Output:</strong></span><br />The output should be printed on the console.</p>
<ul>
<li>If the ingredients for current bake are not enough:</li>
</ul>
<p><strong>"Ingredients are not enough for a box of cookies."</strong></p>
<ul>
<li>If the ingredients for current bake are enough:</li>
</ul>
<p><strong>"Boxes of cookies: {boxes of cookies per current bake}."</strong></p>
<ul>
<li>On the last line print:</li>
</ul>
<p><strong>"Total boxes: {totalBoxes for all bakes}"</strong></p>
<p><span><strong>Examples:</strong></span></p>
<p><span><strong><img src="https://forum.tutorials7.com/images/santas-cookies-php-task-examples.jpg" alt="santas cookies php task examples" /></strong></span></p>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>mitko</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/santas-cookies-php-task/</guid>
                    </item>
				                    <item>
                        <title>Strong Number - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/strong-number-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 15:07:37 +0000</pubdate>
                        <description><![CDATA[Write a program to check if a given number is a strong number or not. A number is strong if the sum of the Factorial of each digit is equal to the number. For example 145 is a strong number,...]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>Write a program to check if a given number is a strong number or not. A number is strong if the sum of the Factorial of each digit is equal to the number. For example 145 is a strong number, because <strong>1! + 4! + 5! = 145</strong>.</p>
<p>Print "<strong>yes</strong>" if the number is strong and "<strong>no</strong>" if the number is not strong.</p>
<p><span><strong>Examples:</strong></span></p>
<p><span><strong><img src="https://forum.tutorials7.com/images/strong-number-php-task.jpg" alt="strong number php task" /></strong></span></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>sam</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/strong-number-php-task/</guid>
                    </item>
				                    <item>
                        <title>Vending Machine - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/vending-machine-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 15:06:04 +0000</pubdate>
                        <description><![CDATA[Your task is to calculate the total price of a purchase from a vending machine. Until you receive &quot;Start&quot; you will be given different coins that are being inserted in the machine. You have t...]]></description>
                        <content:encoded><![CDATA[<p>Your task is to calculate the total price of a purchase from a vending machine. Until you receive "Start" you will be given different coins that are being inserted in the machine. You have to sum them in order to have the total money inserted. There is a problem though. Your vending machine only works with 0.1, 0.2, 0.5, 1, and 2 coins. If someone tries to insert some other coins you have to display "Cannot accept {money}" and not add it to the total money. On the next few lines until you receive "End" you will be given products to purchase. Your machine has however only "Nuts", "Water", "Crisps", "Soda", "Coke". The prices are: 2.0, 0.7, 1.5, 0.8, 1.0 respectively. If the person tries to purchase a not existing product print “Invalid product”. Be careful that the person may try to purchase a product they don’t have the money for. In that case print "Sorry, not enough money". If the person purchases a product successfully print "Purchased {product name}". After the "End" command print the money that are left formatted to the second decimal point in the format "Change: {money left}".</p>
<p><span><strong>Hint:</strong></span> <em>You can use round() method with precision.</em></p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/vending-machine-php-task.jpg" alt="vending machine php task" /></p>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>jolieann</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/vending-machine-php-task/</guid>
                    </item>
				                    <item>
                        <title>Sum Digits - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/sum-digits-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 15:03:50 +0000</pubdate>
                        <description><![CDATA[You will be given a single integer. Your task is to find the sum of its digits.
Examples:]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>You will be given a single integer. Your task is to find the sum of its digits.</p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/sum-digits-php-task.jpg" alt="sum digits php task" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>eiorgert</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/sum-digits-php-task/</guid>
                    </item>
				                    <item>
                        <title>Chars to String - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/chars-to-string-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 14:59:35 +0000</pubdate>
                        <description><![CDATA[Write a program that reads 3 lines of input. On each line you get a single character. Combine all the characters into one string and print it on the console.
Examples:]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>Write a program that reads 3 lines of input. On each line you get a single character. Combine all the characters into one string and print it on the console.</p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/chars-to-string-php-task.jpg" alt="chars to string php task" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>nikole</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/chars-to-string-php-task/</guid>
                    </item>
				                    <item>
                        <title>Town Info - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/town-info-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 14:58:12 +0000</pubdate>
                        <description><![CDATA[You will be given 3 lines of input. On the first line you will be given the name of the town, on the second – the population and on the third the area. Use the correct data types and print t...]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>You will be given 3 lines of input. On the first line you will be given the name of the town, on the second – the population and on the third the area. Use the correct data types and print the result in the following format:</p>
<p><strong>"Town {town name} has population of {population} and area {area} square km".</strong></p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/town-info-php-task.jpg" alt="town info php task" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>richard8502</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/town-info-php-task/</guid>
                    </item>
				                    <item>
                        <title>Convert Meters to Kilometres</title>
                        <link>https://tutorials7.com/ko/qa/php/convert-meters-to-kilometres/</link>
                        <pubdate>Tue, 05 Nov 2024 14:56:46 +0000</pubdate>
                        <description><![CDATA[You will be given an integer that will be distance in meters. Write a program that converts meters to kilometers formatted to the second decimal point.
Examples:]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>You will be given an integer that will be distance in meters. Write a program that converts meters to kilometers formatted to the second decimal point.</p>
<p><strong><span>Examples:</span></strong></p>
<p><strong><span><img src="https://forum.tutorials7.com/images/convert-meters-to-kilometres-php-task.jpg" alt="convert meters to kilometres php task" /></span></strong></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>hues</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/convert-meters-to-kilometres/</guid>
                    </item>
				                    <item>
                        <title>British pounds to Dollars - PHP Task</title>
                        <link>https://tutorials7.com/ko/qa/php/british-pounds-to-dollars-php-task/</link>
                        <pubdate>Tue, 05 Nov 2024 14:54:31 +0000</pubdate>
                        <description><![CDATA[Write a program that converts British pounds(real number) to dollars formatted to 3th decimal point.
1 British Pound = 1.31 Dollars
Examples:]]></description>
                        <content:encoded><![CDATA[<div class="entry-content">
<p>Write a program that converts British pounds(real number) to dollars formatted to 3th decimal point.</p>
<p><strong>1 British Pound = 1.31 Dollars</strong></p>
<p><span><strong>Examples:</strong></span></p>
<p><img src="https://forum.tutorials7.com/images/pounds-to-dollars-php-task.jpg" alt="pounds to dollars php task" /></p>
</div>]]></content:encoded>
						                            <category domain="https://tutorials7.com/ko/qa/php/">PHP</category>                        <dc:creator>paulcabalit</dc:creator>
                        <guid ispermalink="true">https://tutorials7.com/ko/qa/php/british-pounds-to-dollars-php-task/</guid>
                    </item>
							        </channel>
        </rss>