how to 1 to 100 in C++, without loop and recursion

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to 1 to 100 in C++, without loop and recursion .So let’s go to our topic #include <iostream> using namespace std; template<int N> class PrintOneToN { public: static void print() { PrintOneToN<N-1>::print(); // Note that this is not recursion … Read more

how to program enter a letter and output the next 2 letters

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to program enter a letter and output the next 2 letters .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); char charac; cout << “Enter your letter : ” << endl; cin>>charac; cout << … Read more

how to print character using ascii value in c++

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to print character using ascii value in c++ .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); char charac; cout << “Enter the character : ” << endl; cin>>charac; int num1=charac; cout << “The ASCII … Read more

How to write program convert temperatures from Celsius to Fahrenheit and vice versa

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  How to write program convert temperatures from Celsius to Fahrenheit and vice versa .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int choice; float ctemp,ftemp; cout << “1.Celsius to Fahrenheit” << endl; cout << … Read more

how to wirte in cpp Program to print the first 10 lines of pascal’s triangle

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to wirte in cpp Program to print the first 10 lines of pascal’s triangle .So let’s go to our topic #include <iostream.h> #include <conio.h> #include <iomanip.h> long triangle(int x,int y); int main() { clrscr(); const lines=10; for (int i=0;i<lines;i++) for … Read more

how to write program enter a sentence and output the number ofuppercase & lowercase consonants, uppercase & lowercase vowels in sentence.

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write program enter a sentence and output the number ofuppercase & lowercase consonants, uppercase & lowercase vowels in sentence.So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); char line[80]; int number_of_vowels,uc,lc,uv,lv; uc=lc=uv=lv=0; cout … Read more

how to write program enter three integers and output the smallest integer using IF

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write program enter three integers and output the smallest integer using IF .So let’s go to our topic #include <iostream.h> #include <conio.h> int main() { clrscr(); int x,y,z,smallest; cout << “Enter 3 integers : “; cin>>x>>y>>z; smallest=x; if(y<smallest) … Read more