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 in cpp enter the principal, rate & time and print the simple interest

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about how to write program in cpp enter the principal, rate & time and print the simple interest.So let’s go to our topic #include <iostream.h> #include <conio.h> void main() { clrscr(); int x; float sinterest,principal,rate,time; for(x=4;x>=0;x—) { cout << “Enter the … Read more

How to write Program switch between different cases in cpp

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about How to write Program switch between different cases in cpp .So let’s go to our topic #include <iostream.h> #include <conio.h> int main() { clrscr(); int choice; cout << “1. Talk” << endl; cout << “2. Eat” << endl; cout << “3. … Read more

Program to enter three integers and output the biggest integer using IF

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

Factorial Using Loop Example Program In C++

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn aboutFactorial Using Loop Example Program In C++ .So let’s go to our topic #include<iostream> #include<conio.h> using namespace std; int main() { // Variable Declaration int counter, n, fact = 1; // Get Input Value cout<<“Enter the Number :”; cin>>n; //for Loop … Read more

Factorial Using Function Example

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  Factorial Using Function Example.So let’s go to our topic Program In C++ #include<iostream> #include<conio.h> using namespace std; //Function long factorial(int); int main() { // Variable Declaration int counter, n; // Get Input Value cout<<“Enter the Number :”; cin>>n; // Factorial … Read more

how to write For Loop Example Program In C++

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to write For Loop Example Program In C++ .So let’s go to our topic #include<iostream> #include<conio.h> using namespace std; int main() { // Variable Declaration int a; // Get Input Value cout<<“Enter the Number :”; cin>>a; //for Loop Block … Read more

how to Write a java program for handling mouse events.

 Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about  how to Write a java program for handling mouse events .So let’s go to our topic   import java.io.*; import java.applet.Applet; import java.awt.*; import java.awt.event.*; /*<applet code=Mouse height=400 width=400></applet>*/ public class Mouse extends Applet implements MouseListener,MouseMotionListener { String txt=””; int … Read more

how to Write a java program that allows the user to draw lines,rectangles and ovals.

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will learn about Write a java program that allows the user to draw lines,rectangles and ovals. Java Source Code.     import java.awt.*; import java.applet.*; public class Draw extends Applet { public void paint(Graphics g) { g.setColor(Color.BLUE); g.drawLine(3,4,10,23); g.drawOval(195,100,90,55); g.drawRect(100,40,90,5); g.drawRoundRect(140,30,90,90,60,30); } } /*<applet … Read more