The journey of self-motivation and personal growth is a lifelong path, filled with twists and turns, triumphs and setbacks. By embracing this journey, we can develop the skills, confidence, and resilience needed to achieve our goals and live a fulfilling life. I hope that my insights and experiences will inspire and motivate you to embark on your own journey of self-discovery and growth.Join me as I share insights, experiences, and practical tips on living a fulfilling life.
Friday, December 13, 2019
Write a C++ program to find the smallest number that can be formed from given sum of digits and number of digits.
Find smallest number with given number of digits and sum of digits
Write a C++ program to find the smallest number that can be formed from given sum of digits and number of digits.
#include
using namespace std;
// Prints the smallest possible number with digit sum 's'
// and 'm' number of digits.
void findSmallest(int m, int s)
{
// If sum of digits is 0, then a number is possible
// only if number of digits is 1.
if (s == 0)
{
(m == 1)? cout << "Smallest number is " << 0
: cout << "Not possible";
return ;
}
// Sum greater than the maximum possible sum.
if (s > 9*m)
{
cout << "Not possible";
return ;
}
// Create an array to store digits of result
int res[m];
// deduct sum by one to account for cases later
// (There must be 1 left for the most significant
// digit)
s -= 1;
// Fill last m-1 digits (from right to left)
for (int i=m-1; i>0; i--)
{
// If sum is still greater than 9,
// digit must be 9.
if (s > 9)
{
res[i] = 9;
s -= 9;
}
else
{
res[i] = s;
s = 0;
}
}
// Whatever is left should be the most significant
// digit.
res[0] = s + 1; // The initially subtracted 1 is
// incorporated here.
cout << "Smallest number is ";
for (int i=0; i cout << res[i];
}
// Driver code
int main()
{
int s = 9, m = 2;
findSmallest(m, s);
return 0;
}
Output :
Smallest number is 18
Write a C++ program to find the smallest number that can be formed from given sum of digits and number of digits.
#include
using namespace std;
// Prints the smallest possible number with digit sum 's'
// and 'm' number of digits.
void findSmallest(int m, int s)
{
// If sum of digits is 0, then a number is possible
// only if number of digits is 1.
if (s == 0)
{
(m == 1)? cout << "Smallest number is " << 0
: cout << "Not possible";
return ;
}
// Sum greater than the maximum possible sum.
if (s > 9*m)
{
cout << "Not possible";
return ;
}
// Create an array to store digits of result
int res[m];
// deduct sum by one to account for cases later
// (There must be 1 left for the most significant
// digit)
s -= 1;
// Fill last m-1 digits (from right to left)
for (int i=m-1; i>0; i--)
{
// If sum is still greater than 9,
// digit must be 9.
if (s > 9)
{
res[i] = 9;
s -= 9;
}
else
{
res[i] = s;
s = 0;
}
}
// Whatever is left should be the most significant
// digit.
res[0] = s + 1; // The initially subtracted 1 is
// incorporated here.
cout << "Smallest number is ";
for (int i=0; i
}
// Driver code
int main()
{
int s = 9, m = 2;
findSmallest(m, s);
return 0;
}
Output :
Smallest number is 18
Thursday, December 12, 2019
What is education?
What is education?
Education:
Meaning :"the process of receiving or giving systematic instruction, especially at a school or university."
Education is the process of facilitating learning, or the acquisition of knowledge, skills, values, beliefs, and habits. Educational methods include teaching, training, storytelling, discussion and directed research. Education frequently takes place under the guidance of educators, however learners can also educate themselves.
Types of education:
1) Formal Education
2) Informal Education
3) Non-formal Education
Education also means helping people to learn how to do things and encouraging them to think about what they learn.
It is also important for educators to teach ways to find and use information. Through education, the knowledge of society, country, and of the world is passed on from generation to generation.
Importance of Education:
1. Increase in literacy rate
2. Level of moral and ethical values
3. Vital role in the development of countries
4. Awareness of rights and responsibilities
5. Education produces good citizens
6. Education is the only key to success in the life of an individual.
7. Education promotes the national interest.
The purpose of education in a given time and place affects who is taught, what is taught, and how the education system behaves.
The education system is a group of institutions it has ministries of education, local educational authorities, teacher training institutions, schools, universities, etc.
whose primary purpose is to provide education to children and young people in educational settings.
Education is also becoming a commodity no longer reserved for children. Adults need it too.
Education:
Meaning :"the process of receiving or giving systematic instruction, especially at a school or university."
Education is the process of facilitating learning, or the acquisition of knowledge, skills, values, beliefs, and habits. Educational methods include teaching, training, storytelling, discussion and directed research. Education frequently takes place under the guidance of educators, however learners can also educate themselves.
Types of education:
1) Formal Education
2) Informal Education
3) Non-formal Education
Education also means helping people to learn how to do things and encouraging them to think about what they learn.
It is also important for educators to teach ways to find and use information. Through education, the knowledge of society, country, and of the world is passed on from generation to generation.
Importance of Education:
1. Increase in literacy rate
2. Level of moral and ethical values
3. Vital role in the development of countries
4. Awareness of rights and responsibilities
5. Education produces good citizens
6. Education is the only key to success in the life of an individual.
7. Education promotes the national interest.
The purpose of education in a given time and place affects who is taught, what is taught, and how the education system behaves.
The education system is a group of institutions it has ministries of education, local educational authorities, teacher training institutions, schools, universities, etc.
whose primary purpose is to provide education to children and young people in educational settings.
Education is also becoming a commodity no longer reserved for children. Adults need it too.
Tuesday, December 10, 2019
What is Gold?
What is Gold?
Gold is a chemical element with the symbol Au.
Atomic number is 79.
In its purest form, it is a bright, slightly reddish yellow, dense, soft, malleable, and ductile metal.
It is one of the least reactive chemical elements and is solid under standard conditions.
gold is a precious metal that has been used for coinage, jewelry, and other arts throughout recorded history.
Because of its unique qualities, gold has been the one material that is universally accepted in exchange for goods and services.gold is still accepted by all nations as a medium of international payment.
Because pure gold is too soft to resist prolonged handling, it is usually alloyed with other metals to increase its hardness for use in jewelry, gold-ware, or coinage. Most gold used in jewelry is alloyed with silver, copper, and a little zinc to produce various shades of yellow gold or with nickel, copper, and zinc to produce white gold. The color of these gold alloys goes from yellow to white as the proportion of silver in them increases; more than 70 percent silver results in alloys that are white. Alloys of gold with silver or copper are used to make gold coins and gold-ware, and alloys with platinum or palladium are also used in jewelry. The content of gold alloys is expressed in 24th, called karats; a 12-karat gold alloy is 50 percent gold, and 24-karat gold is pure.
Different Types of Gold Karats
Karat is the term used to measure the purity of gold. Before we understand the difference between 24 K, 22 K and 18 K gold, you must know what karat stands for. Karat is basically a unit used to measure the purity of gold. The higher the karat age, the purer the gold. Here’s a simple guide to understanding the difference between 24 K, 22 K and 18 K gold.
24 K gold
24 k gold is also called pure gold or 100 per cent gold. This means that all 24 parts in the gold are all pure gold without traces of any other metals. It is known to be 99.9 per cent pure and takes on a distinct bright yellow color. There is no higher form of gold than 24 K and you must be aware of this before you go to a dealer who might tell you that they’re selling you 25 K or 26 K gold. Since this is the purest form of gold, it is naturally more expensive than 22 K or 18 K gold. However, this type of gold is lesser in density as compared to gold of a lower karat age which makes it soft and pliable. Hence, it is not suited for regular forms of jewelry. Coins and bars are mostly bought of 24 K gold purity. 24 K gold is also used in electronics and medical devices such as those used for children suffering from ear infections who are fitted with gold tympanist tubes that are known to improve aeration of the middle ear.
22 K gold
22 K gold jewelry implies that 22 parts of the jewelry amounts to gold and the balance 2 parts are some other metals. This kind of gold is commonly used in jewelry making. In 22 K gold, of the 100 per cent, only 91.67 per cent is pure gold. The other 8.33 per cent comprises metals like silver, zinc, nickel and other alloys. It is this addition of metals that make the texture of gold harder thereby making the jewelry durable. However, you must know that although this can be used to make plain gold jewelry, 22 K gold isn’t preferable for diamonds and heavily studded jewelry.
18 K gold
18 K gold is 75 per cent gold mixed with 25 per cent of other metals like copper or silver etc. Usually studded jewelry and other diamond jewelry is made in 18 K gold. This kind of gold is less expensive compared to 24 K and 22 K. This one has a slightly dull gold color. Recognizing 18 K jewelry is rather simple – you will see the item stamped with 18 K, 18 K, 18 K or a variation similar to these. At times, 18 K gold is marked by 750, 0.75 or a stamp similar to these in order to symbolize that the jewelry contains 75 per cent gold.
24 karat = 99.5% pure gold and above
22 karat = 91.7 % gold
18 karat = 75.0 % gold
14 karat = 58.3 % gold
12 karat = 50.0 % gold
10 karat = 41.7 % gold
Gold does not react with oxygen at any temperature and, up to 100 °C, is resistant to attack from ozone.
To ensure the purity of gold by BIS look on the hallmarked gold jewelry:
1. BIS Mark;
2. Purity in Karat and fineness;
3. Assaying and Hallmarking Center's identification mark/number;
4. Jeweler's Identification mark/number
Gold is a chemical element with the symbol Au.
Atomic number is 79.
In its purest form, it is a bright, slightly reddish yellow, dense, soft, malleable, and ductile metal.
It is one of the least reactive chemical elements and is solid under standard conditions.
gold is a precious metal that has been used for coinage, jewelry, and other arts throughout recorded history.
Because of its unique qualities, gold has been the one material that is universally accepted in exchange for goods and services.gold is still accepted by all nations as a medium of international payment.
Because pure gold is too soft to resist prolonged handling, it is usually alloyed with other metals to increase its hardness for use in jewelry, gold-ware, or coinage. Most gold used in jewelry is alloyed with silver, copper, and a little zinc to produce various shades of yellow gold or with nickel, copper, and zinc to produce white gold. The color of these gold alloys goes from yellow to white as the proportion of silver in them increases; more than 70 percent silver results in alloys that are white. Alloys of gold with silver or copper are used to make gold coins and gold-ware, and alloys with platinum or palladium are also used in jewelry. The content of gold alloys is expressed in 24th, called karats; a 12-karat gold alloy is 50 percent gold, and 24-karat gold is pure.
Different Types of Gold Karats
Karat is the term used to measure the purity of gold. Before we understand the difference between 24 K, 22 K and 18 K gold, you must know what karat stands for. Karat is basically a unit used to measure the purity of gold. The higher the karat age, the purer the gold. Here’s a simple guide to understanding the difference between 24 K, 22 K and 18 K gold.
24 K gold
24 k gold is also called pure gold or 100 per cent gold. This means that all 24 parts in the gold are all pure gold without traces of any other metals. It is known to be 99.9 per cent pure and takes on a distinct bright yellow color. There is no higher form of gold than 24 K and you must be aware of this before you go to a dealer who might tell you that they’re selling you 25 K or 26 K gold. Since this is the purest form of gold, it is naturally more expensive than 22 K or 18 K gold. However, this type of gold is lesser in density as compared to gold of a lower karat age which makes it soft and pliable. Hence, it is not suited for regular forms of jewelry. Coins and bars are mostly bought of 24 K gold purity. 24 K gold is also used in electronics and medical devices such as those used for children suffering from ear infections who are fitted with gold tympanist tubes that are known to improve aeration of the middle ear.
22 K gold
22 K gold jewelry implies that 22 parts of the jewelry amounts to gold and the balance 2 parts are some other metals. This kind of gold is commonly used in jewelry making. In 22 K gold, of the 100 per cent, only 91.67 per cent is pure gold. The other 8.33 per cent comprises metals like silver, zinc, nickel and other alloys. It is this addition of metals that make the texture of gold harder thereby making the jewelry durable. However, you must know that although this can be used to make plain gold jewelry, 22 K gold isn’t preferable for diamonds and heavily studded jewelry.
18 K gold
18 K gold is 75 per cent gold mixed with 25 per cent of other metals like copper or silver etc. Usually studded jewelry and other diamond jewelry is made in 18 K gold. This kind of gold is less expensive compared to 24 K and 22 K. This one has a slightly dull gold color. Recognizing 18 K jewelry is rather simple – you will see the item stamped with 18 K, 18 K, 18 K or a variation similar to these. At times, 18 K gold is marked by 750, 0.75 or a stamp similar to these in order to symbolize that the jewelry contains 75 per cent gold.
24 karat = 99.5% pure gold and above
22 karat = 91.7 % gold
18 karat = 75.0 % gold
14 karat = 58.3 % gold
12 karat = 50.0 % gold
10 karat = 41.7 % gold
Gold does not react with oxygen at any temperature and, up to 100 °C, is resistant to attack from ozone.
To ensure the purity of gold by BIS look on the hallmarked gold jewelry:
1. BIS Mark;
2. Purity in Karat and fineness;
3. Assaying and Hallmarking Center's identification mark/number;
4. Jeweler's Identification mark/number
What is Forex?
What is Forex?
Forex, also known as foreign exchange, FX or currency trading,
The foreign exchange market (Forex, FX, or currency market) is a global decentralized or
over-the-counter (OTC) market for the trading of currencies.
This market determines foreign exchange rates for every currency.
It includes all aspects of buying, selling and exchanging currencies at current or determined prices.
Its continuous operation: 24 hours a day except for weekends, i.e., trading from 22:00 GMT on Sunday (Sydney) until 22:00 GMT Friday (New York);
The foreign exchange market assists international trade and investments by enabling currency conversion.
In a typical foreign exchange transaction, a party purchases some quantity of one currency by paying with some quantity of another currency.
Just like stocks, you can trade currency based on what you think its value is.
The US dollar is by far the most traded currency.
Benefit: exchange rates change all the time, and Forex traders attempt to profit from these changes
Forex, also known as foreign exchange, FX or currency trading,
The foreign exchange market (Forex, FX, or currency market) is a global decentralized or
over-the-counter (OTC) market for the trading of currencies.
This market determines foreign exchange rates for every currency.
It includes all aspects of buying, selling and exchanging currencies at current or determined prices.
Its continuous operation: 24 hours a day except for weekends, i.e., trading from 22:00 GMT on Sunday (Sydney) until 22:00 GMT Friday (New York);
The foreign exchange market assists international trade and investments by enabling currency conversion.
In a typical foreign exchange transaction, a party purchases some quantity of one currency by paying with some quantity of another currency.
Just like stocks, you can trade currency based on what you think its value is.
The US dollar is by far the most traded currency.
Benefit: exchange rates change all the time, and Forex traders attempt to profit from these changes
What is visa?
What is visa?
Visa full form :
A visa stands for Visitor’s Intention to Stay Abroad , is a document showing that a person is authorized to enter or leave the territory for which it was issued,subject to permission of an immigration official at the time of actual entry.
The authorization may be a document, but more commonly it is a stamp endorsed
in the applicant's passport.
Some countries do not require a visa in some situations,
such as a result of reciprocal treaty arrangements.
The country issuing the visa typically attaches various conditions of stay, such as the territory covered by the visa, dates of validity, period of stay, whether the visa is valid for more than one visit, etc.
A visa generally gives non-citizens clearance to enter a country and to remain there within specified constraints, such as a time frame for entry, a limit on the time spent in the country, and a prohibition against employment.
Types and names of visas :
Transit visas
Short-stay or visitor visa
Long-stay visa
Immigrant visa
Official visa
On-arrival visa
Electronic visa
Visa full form :
A visa stands for Visitor’s Intention to Stay Abroad , is a document showing that a person is authorized to enter or leave the territory for which it was issued,subject to permission of an immigration official at the time of actual entry.
The authorization may be a document, but more commonly it is a stamp endorsed
in the applicant's passport.
Some countries do not require a visa in some situations,
such as a result of reciprocal treaty arrangements.
The country issuing the visa typically attaches various conditions of stay, such as the territory covered by the visa, dates of validity, period of stay, whether the visa is valid for more than one visit, etc.
A visa generally gives non-citizens clearance to enter a country and to remain there within specified constraints, such as a time frame for entry, a limit on the time spent in the country, and a prohibition against employment.
Types and names of visas :
Transit visas
Short-stay or visitor visa
Long-stay visa
Immigrant visa
Official visa
On-arrival visa
Electronic visa
Monday, December 2, 2019
Meditation is good for health
Meditation:
1. Listen Meditation Music to relax your body which will relieve you from stress.
2. Binaural beat meditation is science to control from negative thinking.
3. Om chanting meditation give you peace, calm, tranquility, and serenity.
4.Breath awareness is a type of mindful meditation that encourages mindful breathing.
5. Yoga is best for meditation.
6. Loving-kindness meditation is designed to promote feelings of compassion and love, both for others and oneself.
7. Mindfulness is a form of meditation that urges practitioners to remain aware and present in the moment.
1. Listen Meditation Music to relax your body which will relieve you from stress.
2. Binaural beat meditation is science to control from negative thinking.
3. Om chanting meditation give you peace, calm, tranquility, and serenity.
4.Breath awareness is a type of mindful meditation that encourages mindful breathing.
5. Yoga is best for meditation.
6. Loving-kindness meditation is designed to promote feelings of compassion and love, both for others and oneself.
7. Mindfulness is a form of meditation that urges practitioners to remain aware and present in the moment.
Nice line
✔ NICE LINE ✔
जीवन में हर जगह
हम "जीत" चाहते हैं...
सिर्फ फूलवाले की दूकान ऐसी है
जहाँ हम कहते हैं कि
"हार" चाहिए।
क्योंकि
हम भगवान से
"जीत" नहीं सकते।
😊😊
About date 2December in hindi २/१२
आज कि तारीख 2-12
जिंदगी ना मिलेगी 2-12
मौत ना मिलेगी 2-12
प्यार ना होगा 2-12
दिल ना तुटेगा 2-12
dost na milega 2-12
ये सब ना होगा 2-12
So enjoy👫friend
क्युकी जिंदगी ना मिलेगी2-12.
🙏🏻☀☀🙏🏻
Solve the following series what number should come next
In below series what number should come next?
1) 2, 1, (1/2), (1/4), ?
Answer 1) 2, 1, (1/2), (1/4), (1/8)
Process:
1/2 in 2 = 1
1/2 in 1 = 1/2
1/2 in 1/2 = 1/4
1/2 in 1/4 = 1/8
So the next number is (1/8).
2) 7, 10, 8, 11, 9, 12, ?
Answer 2) 7, 10, 8, 11, 9, 12, 10
Process:
7+3=10
10–2=8
8+3=11
11–2=9
9+3=12
12–2=10
So the next number is 10.
3) 36, 34, 30, 28, 24 , ?
Answer 3) 36, 34, 30, 28, 24 , 22
Process:
Now numbering to get a clear idea of odd and even position.
1,2,3,4,5
Both at the even and odd positions the difference between the numbers is 6.
Like between first and third position
36–30 = 6
Similarly for second and fourth position
34–28 = 6
So for the next position let the number be x and it is even position.
x = 28–6 = 22
So the next number is 22.
4) 22, 21, 23, 22, 24, 23, ?
Answer 4) 22, 21, 23, 22, 24, 23, 25
Process:
sequence is -1 +2 -1 +2 -1 +2 , altenatively the next element value is decrement by 1 and updated value is incremented by 2
So the next number is 25.
5) 21, 9, 21, 11, 21, 13, 21, ?
Answer: 5) 21, 9, 21, 11, 21, 13, 21, 15
Process:
21 , 21 , 21 , 21 , ,...series (1)
9 , 11 , 13 , 15 , ,...series(2)
series(2) increases by 2, beginning with the number 9 by mixing we get answer.
So the next number is 15.
6) 58, 52, 46, 40, 34, ?
Answer 6) 58, 52, 46, 40, 34, 28
Process:
This is a simple subtraction series. Each number is 6 less than the previous number.
So the next number is 28.
7) 3, 4, 7, 8, 11, 12, ?
Answer 7) 3, 4, 7, 8, 11, 12, 15
Process:
Form differences between two consecutive numbers in the sequence as follows:
4 - 3 = 1
7 - 4 = 3
8 - 7 = 1
11 - 8 = 3
12 - 11 = 1
x - 12 = 3
x = 12 +3
x= 15
So the next number is 15.
8 ) 31, 29, 24, 22, 17, ?
Answer 8 ) 31, 29, 24, 22, 17, 15
Process:
31–2=29,
29–5=24,
24–2=22,
22–5=17,
17–2=15,
So the next number is 15.
9) 14, 28, 20, 40, 32, 64, ?
Answer 9) 14, 28, 20, 40, 32, 64, 56
Process:
14
28 (14*2)
20(28–8)
40(20*2)
32(40–8)
64(32*2)
56(64–8)
So the next number is 56.
10) 201, 202, 204, 207, ?
Answer 10) 201, 202, 204, 207, 211
Process:
In this addition series,
1 is added to the first number;
2 is added to the second number;
3 is added to the third number;
4 is added to the fourth number; and go on.
201
202 = 201 + 1
204 = 202 + 2
207 = 204 + 3
So, the next number in the series be
= 207 + 4
= 211.
So the next number is 211.
1) 2, 1, (1/2), (1/4), ?
Answer 1) 2, 1, (1/2), (1/4), (1/8)
Process:
1/2 in 2 = 1
1/2 in 1 = 1/2
1/2 in 1/2 = 1/4
1/2 in 1/4 = 1/8
So the next number is (1/8).
2) 7, 10, 8, 11, 9, 12, ?
Answer 2) 7, 10, 8, 11, 9, 12, 10
Process:
7+3=10
10–2=8
8+3=11
11–2=9
9+3=12
12–2=10
So the next number is 10.
3) 36, 34, 30, 28, 24 , ?
Answer 3) 36, 34, 30, 28, 24 , 22
Process:
Now numbering to get a clear idea of odd and even position.
1,2,3,4,5
Both at the even and odd positions the difference between the numbers is 6.
Like between first and third position
36–30 = 6
Similarly for second and fourth position
34–28 = 6
So for the next position let the number be x and it is even position.
x = 28–6 = 22
So the next number is 22.
4) 22, 21, 23, 22, 24, 23, ?
Answer 4) 22, 21, 23, 22, 24, 23, 25
Process:
sequence is -1 +2 -1 +2 -1 +2 , altenatively the next element value is decrement by 1 and updated value is incremented by 2
So the next number is 25.
5) 21, 9, 21, 11, 21, 13, 21, ?
Answer: 5) 21, 9, 21, 11, 21, 13, 21, 15
Process:
21 , 21 , 21 , 21 , ,...series (1)
9 , 11 , 13 , 15 , ,...series(2)
series(2) increases by 2, beginning with the number 9 by mixing we get answer.
So the next number is 15.
6) 58, 52, 46, 40, 34, ?
Answer 6) 58, 52, 46, 40, 34, 28
Process:
This is a simple subtraction series. Each number is 6 less than the previous number.
So the next number is 28.
7) 3, 4, 7, 8, 11, 12, ?
Answer 7) 3, 4, 7, 8, 11, 12, 15
Process:
Form differences between two consecutive numbers in the sequence as follows:
4 - 3 = 1
7 - 4 = 3
8 - 7 = 1
11 - 8 = 3
12 - 11 = 1
x - 12 = 3
x = 12 +3
x= 15
So the next number is 15.
8 ) 31, 29, 24, 22, 17, ?
Answer 8 ) 31, 29, 24, 22, 17, 15
Process:
31–2=29,
29–5=24,
24–2=22,
22–5=17,
17–2=15,
So the next number is 15.
9) 14, 28, 20, 40, 32, 64, ?
Answer 9) 14, 28, 20, 40, 32, 64, 56
Process:
14
28 (14*2)
20(28–8)
40(20*2)
32(40–8)
64(32*2)
56(64–8)
So the next number is 56.
10) 201, 202, 204, 207, ?
Answer 10) 201, 202, 204, 207, 211
Process:
In this addition series,
1 is added to the first number;
2 is added to the second number;
3 is added to the third number;
4 is added to the fourth number; and go on.
201
202 = 201 + 1
204 = 202 + 2
207 = 204 + 3
So, the next number in the series be
= 207 + 4
= 211.
So the next number is 211.
Subscribe to:
Posts (Atom)
Featured posts
Happy Independence Day August 15th
Here's a message for India's Independence Day (August 15th): "शुभ स्वतंत्रता दिवस! आजादी की 79वीं वर्षगांठ पर, आइए हम अपने देश...

Popular posts
-
A warehouse in the supply chain business plays a crucial role in storing and managing inventory. Here's a brief overview: Key Functions...