<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Programming questions and answers for competition level</title><description>You can find more  questions  of programming also answers you can easily copy on https://codeforprogrammingpro.blogspot.com/</description><managingEditor>noreply@blogger.com (sarvesh creater)</managingEditor><pubDate>Sat, 28 Jun 2025 13:09:42 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">49</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>https://codeforprogrammingpro.blogspot.com/</link><language>en-us</language><item><title>with rand function simple subtraction quiz generates </title><link>https://codeforprogrammingpro.blogspot.com/2021/01/with-rand-function-simple-subtraction.html</link><category>Beginner</category><category>cstdlib</category><category>ctime</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Thu, 21 Jan 2021 18:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-3486407856117503133</guid><description>&amp;nbsp;generating random number quiz&amp;nbsp;#include&amp;lt;iostream&amp;gt;#include&amp;lt;ctime&amp;gt; // for time function#include&amp;lt;cstdlib&amp;gt; // for rand and srand functionusing namespace std;int main(){	// 1. generate two random single-digit integers	srand(time(0));	int number1 = rand() % 10;	int number2 = rand() % 10;		// 2. if number1&amp;lt;number 2 ,sawp number	if (number1 &amp;lt; number2)	{		int temp = </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Body Mass Index (BMI) is a measure of health based on height and weight. You can calculate your BMI by taking your weight in kilograms and dividing it by the square of your height in meters</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/body-mass-index-bmi-is-measure-of.html</link><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Fri, 8 Jan 2021 18:28:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-1692479463968306399</guid><description>&amp;nbsp;Body Mass Index (BMI) is a measure of health based on height and weight. You can calculateyour BMI by taking your weight in kilograms and dividing it by the square of your height inmeters. The interpretation of BMI for people 20 years or older is as follows:BMI InterpretationBMI &amp;lt; 18.5 Underweight18.5 &amp;lt;= BMI &amp;lt; 25.0 Normal25.0 &amp;lt;= BMI &amp;lt; 30.0 Overweight30.0 &amp;lt;= BMI Obese#</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write an if statement that increases pay by 3% if score is greater than 90.</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/write-if-statement-that-increases-pay.html</link><category>Beginner</category><category>C++</category><category>if</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Fri, 8 Jan 2021 17:47:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-2163321707317895358</guid><description>&amp;nbsp;Write an if statement that increases pay by 3% if score is greater than 90.#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	float pay = 10;	int score;	cout&amp;lt;&amp;lt;" enter your score :";	cin&amp;gt;&amp;gt;score;		if(score &amp;gt; 90)	{		pay = pay + pay* 3/100;		}	cout&amp;lt;&amp;lt;"you win price :"&amp;lt;&amp;lt;pay&amp;lt;&amp;lt;endl;	return 0;}output:-&amp;nbsp;enter your score :29you win price :10&amp;nbsp;enter your </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Common Error : Equality Test of Two Floating-Point Values</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/common-error-equality-test-of-two.html</link><category>Beginner</category><category>C++</category><category>errors</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Fri, 8 Jan 2021 17:44:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-661835329114601319</guid><description>&amp;nbsp;Common Error : Equality Test of Two Floating-Point Values#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	double x = 0.1+0.1+0.1+0.1;	if(x == 0.5)	{		cout&amp;lt;&amp;lt;"x is equal to 0.5";	}	else	{		cout&amp;lt;&amp;lt;"x is not equal to 0.5";	}	return 0;}output:-x is not equal to 0.5</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write an if statement that assigns 1 to x if y is greater than 0.</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/write-if-statement-that-assigns-1-to-x.html</link><category>Beginner</category><category>C++</category><category>if</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Fri, 8 Jan 2021 14:17:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-978597765852968573</guid><description>&amp;nbsp;Write an if statement that assigns 1 to x if y is greater than 0./* Write an if statement that assigns 1 to x if y is greater than 0. */#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	int x;	int y;		cout&amp;lt;&amp;lt;" enter positive or negative number :";	cin&amp;gt;&amp;gt;y;	if(y &amp;gt; 0)	{		x=1;	}	if(y &amp;lt; 0)	{		x=0;	}		cout&amp;lt;&amp;lt;" x is "&amp;lt;&amp;lt;x;	return 0;}output:-&amp;nbsp;enter positive or </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>checking the input number is even or not</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/checking-input-number-is-even-or-not.html</link><category>Beginner</category><category>C++</category><category>if</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Fri, 8 Jan 2021 14:10:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-2913003201980401695</guid><description>&amp;nbsp;checking the input number is even or not#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	//checking the input number is even or not		int num;	cout&amp;lt;&amp;lt;"enter a number :";	cin&amp;gt;&amp;gt;num;		if(num%2 == 0)	{		cout&amp;lt;&amp;lt;num&amp;lt;&amp;lt;" number is even number";	}	if(num%2 != 0)	{		cout&amp;lt;&amp;lt;num&amp;lt;&amp;lt;" number is odd number";	}		return 0;}  output :-enter a number :22 number is even </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>logic operators in cpp</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/logic-operators-in-cpp.html</link><category>Beginner</category><category>C++</category><category>logic oprators</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:16:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5231952678963381082</guid><description>&amp;nbsp;logic operators in cpp#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	cout&amp;lt;&amp;lt;"logic operators"&amp;lt;&amp;lt;endl;	if(!false)	{		cout&amp;lt;&amp;lt;"Not false&amp;nbsp; !"&amp;lt;&amp;lt;endl;	}	if(true || false)	{		cout&amp;lt;&amp;lt;"OR&amp;nbsp; ||"&amp;lt;&amp;lt;endl;	}	if(true &amp;amp;&amp;amp; 1)	{		cout&amp;lt;&amp;lt;"And &amp;amp;&amp;amp;"&amp;lt;&amp;lt;endl;	}	return 0;}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Relation Operators in cpp</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/relation-operators-in-cpp.html</link><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:14:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-1180502051926310826</guid><description>&amp;nbsp;Relation Operators in cpp#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	cout&amp;lt;&amp;lt;"Relation Operators"&amp;lt;&amp;lt;endl;	cout&amp;lt;&amp;lt;"less than "&amp;lt;&amp;lt;"( &amp;lt; )"&amp;lt;&amp;lt;" 5&amp;lt;5&amp;nbsp; ans "&amp;lt;&amp;lt;(5&amp;lt;5)&amp;lt;&amp;lt;endl;	cout&amp;lt;&amp;lt;"greater than "&amp;lt;&amp;lt;"( &amp;gt; )"&amp;lt;&amp;lt;" 5&amp;gt;5 ans "&amp;lt;&amp;lt;(5&amp;gt;5)&amp;lt;&amp;lt;endl;	cout&amp;lt;&amp;lt;"less than or equal to"&amp;lt;&amp;lt;"( &amp;lt;= )"&amp;lt;&amp;lt;" 5&amp;lt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>if else if else syntax in cpp</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/if-else-if-else-syntax-in-cpp.html</link><category>Beginner</category><category>C++</category><category>if else</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:13:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-2335726143570129640</guid><description>&amp;nbsp;if else if else syntax in cpp#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	if(true)	{		cout&amp;lt;&amp;lt;"if true"&amp;lt;&amp;lt;endl;	}	else if(false)	{		cout&amp;lt;&amp;lt;"if false"&amp;lt;&amp;lt;endl;	}	else	{		cout&amp;lt;&amp;lt;"not true or false"&amp;lt;&amp;lt;endl;	}	return 0;}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>if nested in Cpp</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/if-nested-in-cpp.html</link><category>Beginner</category><category>C++</category><category>if</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:11:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5793005706594327302</guid><description>&amp;nbsp;if inside if syntax in cpp#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	if(true)	{		cout&amp;lt;&amp;lt;"first true"&amp;lt;&amp;lt;endl;		if(true)		{			cout&amp;lt;&amp;lt;"second true"&amp;lt;&amp;lt;endl;			if(true)			{			&amp;nbsp; &amp;nbsp;cout&amp;lt;&amp;lt;"third true"&amp;lt;&amp;lt;endl;			}			if(false)			{				//not show output			}		}		if(false)		{			//not show output		}	}	return 0;}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>if syntax in c++</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/if-syntax-in-c.html</link><category>Beginner</category><category>C++</category><category>if</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:08:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-8477430294840946890</guid><description>&amp;nbsp;if syntax in c++#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	//this statment is show output	if(true)	{		cout&amp;lt;&amp;lt;"it is true"&amp;lt;&amp;lt;endl;	}	if(1)	{		cout&amp;lt;&amp;lt;"it is also true"&amp;lt;&amp;lt;endl;	}	//this statment not show output	if(false)	{		cout&amp;lt;&amp;lt;"it is false "&amp;lt;&amp;lt;endl;	}	if(0)	{		cout&amp;lt;&amp;lt;"it is also false"&amp;lt;&amp;lt;endl;	}	return 0;}</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>if else in c++</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/if-else-in-c.html</link><category>Beginner</category><category>C++</category><category>if else</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 21:06:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5705314597704745840</guid><description>&amp;nbsp;if else syntax in c++#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	//if statement is true then not go to else	if(true)	{		cout&amp;lt;&amp;lt;"if is ture"&amp;lt;&amp;lt;endl;	}	else	{		cout&amp;lt;&amp;lt;"else is false"&amp;lt;&amp;lt;endl;	}	//if statment is false then go to else	if(false)	{		cout&amp;lt;&amp;lt;"if is false"&amp;lt;&amp;lt;endl;	}	else	{		cout&amp;lt;&amp;lt;"else is true"&amp;lt;&amp;lt;endl;	}	if(1)	{		cout&amp;lt;&amp;lt;"if is</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that reads the subtotal and  the gratuity rate, then computes the gratuity and total. For example, if the user enters  10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and  $11.5 as total.</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/write-program-that-reads-subtotal-and.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 20:49:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5895275631868964305</guid><description>(Financial application: calculate tips) Write a program that reads the subtotal and&amp;nbsp;the gratuity rate, then computes the gratuity and total. For example, if the user enters&amp;nbsp;10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and&amp;nbsp;$11.5 as total.#BeginnerIn gcc c++ compiler using namespace std;#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	float </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO4F63wpjBSMHekO19wFUK1q3yIlzU1oxxr8mt7thiJ9JM6w1PSKAdT0un5GgU9Euu24Rdgq2vAWz19Od8ISxuqaCg5xXBkMh5e-dKDSAwF6PUokeRbGR0N-Qj-rCaOaymFBnk_WKoFkI/s72-w200-h150-c/20200813_020542.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that converts pounds into kilo- grams. The program prompts the user to enter a number in pounds, converts it to  kilograms, and displays the result. One pound is 0.454 kilograms.</title><link>https://codeforprogrammingpro.blogspot.com/2021/01/write-program-that-converts-pounds-into.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 6 Jan 2021 20:49:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5980207857657582418</guid><description>(Convert pounds into kilograms) Write a program that converts pounds into kilo-grams. The program prompts the user to enter a number in pounds, converts it to&amp;nbsp;kilograms, and displays the result. One pound is 0.454 kilograms.#BeginnerIn gcc c++ compiler using namespace std;#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	float pound;	cout&amp;lt;&amp;lt;"enter the pound :";	cin&amp;gt;&amp;gt;pound;		</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEganfqISnwdQfftqvjRchs23Vo5ub9POLk232UCMvY03jsRa8ZTYigzmubAmC7-1KC8HKxuZd2Jm6_Lw_4SvRaseDdsohe-8RZGJhIp7jfLjs0-E4tksQxDY_MSkHdPFtxqyxGFq79_yLU/s72-w200-h150-c/20200813_021009.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>bool data type in c++ program</title><link>https://codeforprogrammingpro.blogspot.com/2020/12/bool-data-type-in-c-program.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Wed, 30 Dec 2020 12:09:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-7893046453751319088</guid><description>&amp;nbsp;Boolean data type is true or false (0 or 1) . This type is use in all of condition statements Example : 5&amp;gt;3 is True but 5&amp;lt;3 is false. The boolean data returns 0 or 1 it is more useful for computer to think on statement.In gcc c++ compiler using namespace std;#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	bool number;	//main value	number=0;	cout&amp;lt;&amp;lt;"bool hold "&amp;lt;&amp;lt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that prompts the user to enter the min- utes (e.g., 1 billion), and displays the number of years and days for the minutes. For  simplicity, assume a year has 365 days</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/find-number-of-years-on-minutes-program.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 14:54:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-1878202577548084209</guid><description>(Find the number of years) Write a program that prompts the user to enter the min-utes (e.g., 1 billion), and displays the number of years and days for the minutes. For&amp;nbsp;simplicity, assume a year has 365 days.#BeginnerIn gcc c++ compiler using namespace std;#include&amp;lt;iostream&amp;gt;using namespace std;int main(){	int minutes;	cout&amp;lt;&amp;lt;"enter the minutes : ";	cin&amp;gt;&amp;gt;minutes;		const int </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWOTeN5xwTQ7K7H7J7Ni2spOgzViE_YjSqeIlsfvTY1ZCoXPIymqtCj08TROyuQ2qwNIoKa62rXNblt4hMnD48ZbYZKYnEl2PNh9VR-DatFJbYQ6jqOMYQxjRPcN-Qq0TsoeIWzTq2X5g/s72-w200-h150-c/20200813_020103.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>ShowCurrenttime gives a program that displays the  current time in GMT. Revise the program so that it prompts the user to enter the time  zone offset to GMT and displays the time in the specified time zone. </title><link>https://codeforprogrammingpro.blogspot.com/2020/09/current-time-on-gmt-base-c-program.html</link><category>Beginner</category><category>C++</category><category>Intermediate</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 14:51:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-5599426636012788337</guid><description>(Current time) ShowCurrenttime gives a program that displays the&amp;nbsp;current time in GMT. Revise the program so that it prompts the user to enter the time&amp;nbsp;zone offset to GMT and displays the time in the specified time zone.&amp;nbsp;#Beginner#IntermediateIn gcc c++ compiler using namespace std;#include&amp;lt;iostream&amp;gt;#include&amp;lt;ctime&amp;gt;using namespace std;int main(){		int totalsec = time(0);	</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_g-2DqdwCwe2Xg1NkSHsEKv7uDuv63WA1ecI_yQXpcG4Yk5gP8lVdEa6cWQp-7hSiWsJDpV3iENF_4o_CoGFqtSzo43sFBqvO37Cd8c6BA9f1406IB-hAHyGOeHraYzJxubf1Zcp2KQ8/s72-w200-h150-c/20200813_015600.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Average acceleration is defined as the change of velocity  divided by the time taken to make the change, as shown in the following formula:</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/acceleration-calculate-c-program.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 14:47:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-2422521083839566049</guid><description>(Physics: acceleration) Average acceleration is defined as the change of velocity&amp;nbsp;divided by the time taken to make the change, as shown in the following formula:a = (v1 - v0)/t&amp;nbsp;Write a program that prompts the user to enter the starting velocity v0 in meters/second, the ending velocity v1 in meters/second, and the time span t in seconds, and&amp;nbsp;displays the average acceleration.&amp;nbsp</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that calculates the energy needed to  heat water from an initial temperature to a final temperature. Your program should  prompt the user to enter the amount of water in kilograms and the initial and final  temperatures of the water.</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/calculating-energy-program-c.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 14:31:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-3142048073075858931</guid><description>(Science:calculating energy ) Write a program that calculates the energy needed to&amp;nbsp;heat water from an initial temperature to a final temperature. Your program should&amp;nbsp;prompt the user to enter the amount of water in kilograms and the initial and final&amp;nbsp;temperatures of the water. The formula to compute the energy isQ = M * (finalTemperature – initialTemperature) * 4184&amp;nbsp;where M is </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLWmytLchgdR22LUxVtSx11XfTTT5aJbzMZiKc2kz42eK4XSNYtFAVu77HSrJXv01KnhqTPZLuHsabLs-XY68quBpYvc1Hxq8opONGedGHyQd9-BSu_2F_e00EPUKl1LSLzWVRDi0k4RM/s72-w200-h150-c/20200813_014547.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared (m/s²), and displays the minimum runway length.</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/finding-runway-length-c-program.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 14:26:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-4993146979729868133</guid><description>(Physics: finding runway length) Given an airplane’s acceleration a and take-off&amp;nbsp;speed v, you can compute the minimum runway length needed for an airplane to take&amp;nbsp;off using the following formula:length = v²/2a&amp;nbsp;Write a program that prompts the user to enter v in meters/second (m/s) and the accel-eration a in meters/second squared (m/s²), and displays the minimum runway length.#</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgclUX53mfC1409hxJolenCSqHeRPtqy709h5XylVGxN68FJ9Lot5mYKdfPPTPLLZswlRyXFyVm2skUGFpIDFLICDx7oyWjn78jwQRpeC8fIDaUorDm6L-SUpbmt6HuXQCsBiehUhSRLAk/s72-w200-h150-c/20200813_014202.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Financial application c++ program</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/financial-application-c-program.html</link><category>Beginner</category><category>C++</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Sat, 26 Sep 2020 13:31:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-8175203981362845606</guid><description>(Financial application: compound value) Suppose you save $100 each month into a&amp;nbsp;savings account with the annual interest rate 5%. Thus, the monthly interest rate is&amp;nbsp;0.05/12 = 0.00417. After the first month, the value in the account becomes100 * (1 + 0.00417) = 100.417&amp;nbsp;&amp;nbsp;After the second month, the value in the account becomes(100 + 100.417) * (1 + 0.00417) = 201.252&amp;nbsp;&amp;nbsp;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYbI9-Ff9LM8XSQN5-Hx5RpnEVvgmvhnSxQ32eYbhoEHX4OZMU2nPgTaUqw3WOC0DSI8ypJf3RU_MUVGHH14IuulYHTWhF1Kolu8JYZ9VLgH667Hq-iPsLUvegz8GsjrbvRVBQP-O8Bbk/s72-w200-h150-c/20200813_013720.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that prompts the user to enter  two points (x1, y1) and (x2, y2) and displays their distance between them.The formula for computing the distance is </title><link>https://codeforprogrammingpro.blogspot.com/2020/09/distance-of-two-points-c-program.html</link><category>Beginner</category><category>C++</category><category>Cmath</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Mon, 14 Sep 2020 17:19:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-6539346788427790651</guid><description>(Geometry: distance of two points) Write a program that prompts the user to enter&amp;nbsp;two points (x1, y1) and (x2, y2) and displays their distance between them.The formula for computing the distance is&amp;nbsp;√(x2 - x1)²+ (y2 - y1)² .Note that you&amp;nbsp;can use pow(a, 0.5) to compute √a.&amp;nbsp;#BeginnerIn gcc c++ compiler using namespace std;  #include&amp;lt;iostream&amp;gt;#include&amp;lt;cmath&amp;gt;using </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXd046j_BfkEUWQHeCbyIHsvZpb01uTXTs_tCrz11ApmLkJs6KozvAMbzGjO02LtCGWPl55REVIL2I53GqR-iDVruhzPKCIQNEX7ngUyWBEGj4VBTKh3EzyDPN8Di8DEEbB7B2-m4Fa04/s72-w200-h150-c/20200813_012828.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that prompts the user to enter the  side of a hexagon and displays its area. The formula for computing the area of a  hexagon is </title><link>https://codeforprogrammingpro.blogspot.com/2020/09/area-of-hexagon-c-program.html</link><category>Beginner</category><category>C++</category><category>Cmath</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Mon, 14 Sep 2020 17:16:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-4157046524238749383</guid><description>(Geometry: area of a hexagon) Write a program that prompts the user to enter the&amp;nbsp;side of a hexagon and displays its area. The formula for computing the area of a&amp;nbsp;hexagon is&amp;nbsp;Area =(3√3 / 2)s².#BeginnerIn gcc c++ compiler using namespace std;  #include&amp;lt;iostream&amp;gt;#include&amp;lt;cmath&amp;gt;using namespace std;int main(){	float side;	cout&amp;lt;&amp;lt;"Enter the side :";	cin&amp;gt;&amp;gt;side;	</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5pxTCKqnTFrTGX_0WjDzhbyfFEnV2kxH4Ijl3vcHMNkLx8r5SQaNS8qA5V1bnstXs1aLJEorUU4atVM_JY3q9qwKNp77emI53sL_F-9SrOEi8kcdzKlJa1I4gkNBUb3Ad2yKJSl-O2fc/s72-w320-h240-c/20200813_012013.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How cold is it outside? The temperature alone is  not enough to provide the answer. Other factors including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed.</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/wind-chill-temperature-c-program.html</link><category>Beginner</category><category>C++</category><category>Cmath</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Mon, 14 Sep 2020 17:12:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-8270323108250630908</guid><description>&amp;nbsp;(Science: wind-chill temperature) How cold is it outside? The temperature alone is&amp;nbsp;not enough to provide the answer. Other factors including wind speed, relative humidity, and sunshine play important roles in determining coldness outside. In 2001, the National Weather Service (NWS) implemented the new wind-chill temperature to measure the coldness using temperature and wind speed. The </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQp1W1daktRlpEhrGEBMIPDRiekJzQtfok7ZEfw-nRahoIgPci-bW95Vhs_b4YEJf0gfhOb-X6cIpjJ4YgznLMhWyGU71toQ8mZdli_okajlN4OtmNKmCl4la6z7VTen2R5zLJo1DDzwg/s72-w320-h240-c/20200813_010935.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Write a program that displays the following table:</title><link>https://codeforprogrammingpro.blogspot.com/2020/09/print-table-c-program.html</link><category>Beginner</category><category>C++</category><category>Cmath</category><author>noreply@blogger.com (sarvesh creater)</author><pubDate>Mon, 14 Sep 2020 16:05:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5849210506368700566.post-1379116003922000446</guid><description>(Print a table) Write a program that displays the following table:x&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pow(x, y)2.5&amp;nbsp; &amp;nbsp;1.2&amp;nbsp; &amp;nbsp; 3.002815.0&amp;nbsp; &amp;nbsp;2.4&amp;nbsp; &amp;nbsp; 47.59131.2&amp;nbsp; &amp;nbsp;3.6&amp;nbsp; &amp;nbsp; 1.927762.4&amp;nbsp; &amp;nbsp;5.0&amp;nbsp; &amp;nbsp; 79.62623.6&amp;nbsp; &amp;nbsp;2.5&amp;nbsp; &amp;nbsp; 24.5899#BeginnerIn gcc c++ compiler using namespace std;  #include&amp;lt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6KOb9191ZSpP7Bj-H7TfGxuddCZk8oKqwdU9A5h6JiXOCgSN0JGpacUx8YX0nmhwGKaLYj3pol_vX1fUnO8fjx2hUrVe4hzM4oBNlhGN0ATs_zWtsNTTc6f9cPNn5wC36zE5YE0xbWsA/s72-w320-h240-c/20200813_005727.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>