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 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 write program in cpp find the sum of either of the diagonals of a 4 x 4 matrix

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write program in cpp find the sum of either of the diagonals of a 4 x 4 matrix .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int x; int A[4][4],sum=0; //Reading the matrix. … Read more

how to write Program to enter 10 integers in a single- dimension array and then print out the array in ascending order

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write Program to enter 10 integers in a single- dimension array and then print out the array in ascending order .So let’s go to our topic This program takes in the ten integers array[x] to be stored in the … 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