Skip to main content

Posts

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 ;     }       /...

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 ...