how to write Program to find the sum of each row & column of a matrix of size n x m andif matrix is square, find the sum of the diagonals also.

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write Program to find the sum of each row & column of a matrix of size n x m andif matrix is square, find the sum of the diagonals also. .So let’s go to our topic #include <iostream.h> #include … Read more

how to write Program to count the number of words and characters in a sentence

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write Program to count the number of words and characters in a sentence .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int countch=0; int countwd=1; cout << “Enter your sentence in lowercase: ” … Read more

how to write Program to find the roots of a quadratic equation

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write Program to find the roots of a quadratic equation .So let’s go to our topic #include <iostream.h> #include <conio.h> #include <math.h> int main() { clrscr(); float a,b,c,d,root1,root2; cout << “Enter the 3 coefficients a, b, c : … Read more

how to write Program to convert days into years and weeks

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write Program to convert days into years and weeks .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int days,years,weeks,num1; cout << “Enter the number of days : ” << endl; cin>>days; years=days/365; … Read more

how to write Program to compute the fibonacci series

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write Program to compute the fibonacci series .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int a,b,x,y,num1,ct; a=0; b=1; cout << “Enter the number of terms (less than 25) : ” << … Read more

how to write Program to find the total days in the year till date

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write Program to find the total days in the year till date .So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int day,month,total; int days_per_month[12]={31,28,31,30,31,30,31,31,30,31,30,31}; cout << “Enter the month : ” << … Read more

how to write Program to enter the unit reading and output the customer’s telephone bill

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write Program to enter the unit reading and output the customer’s telephone bill .So let’s go to our topic #include <iostream.h> #include <conio.h> int main() { clrscr(); long int units,charge=0; float total; const int rent=25; cout << “Enter … Read more