CODEBLOCKS IDE download latest version !

Code blocks is by far my favorite c++ editor software which has tons of options you need while making a program.It comes with Integrated Development Environment(IDE) which is extremely easy to use and it also supports graphical programming ,but I highly recommend QT creator if you want graphical programming .

codeblocks supports multiple compilers including GCC, Clang and Visual C++. It is developed in C++ using wxWidgets as the GUI toolkit. Using a plugin architecture, its capabilities and features are defined by the provided plugins. Currently, Code::Blocks is oriented towards C, C++, and Fortran.

Continue reading

Initiate shutdown,restart,and sleep tasks after a specified time .

Many times you want to schedule various tasks like shutdown , restart, sleep etc in windows after a TIME that you specify . You can shutdown windows from command prompt after some time specified but how about sleep, lock, hibernate , log off  ? .In this tutorial I will share the program that I have created which can do all those things .I call it TASK MASTER which can perform windows based tasks after the specified hours,minutes and seconds .

Key FEATURES :-

  1. Schedule shutdown after a specified time.
  2. Lock windows .
  3. Log off after the specified time.
  4. Restart windows after the time .
  5. Sleep windows .
  6. Hibernate windows.

Continue reading

Program to find sum of series “1+ 1/3! + 1/5! + 1/7! + ……………+ 1/n! “.

source code:

#include <iostream>
#include<iomanip>
#include<conio.h>
#include<math.h>

using namespace std;

int main()
{
    int num,i=1;
    double fact=1,sum=0;
    cout<<"Enter number : "<<endl;
    cin>>num;cout<<endl<<endl;

    while(i<=num)
    {
        if(i>1)
            fact=fact*(i-1)*i;

        sum=sum+(1/fact);
        i=i+2;
    }
    cout<<"Sum is "<<sum;
    getch();
}

Program to find “SUM OF DIGITS of a given number” using while loop.

source code:

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
void main()
{
  int number,r,rev=0;
  cout<<"Enter a number to find sum of its digits : ";
  cin>>number;cout<<endl;
  while(number>0)
     {
        r=number%10;
        rev=rev*10+r;
        number=number/10;
      }
  
  cout<<"Reverse is "<<rev;
  getch();
}

Program to find sum of the series “1+x+x^2+x^3+…………..+x^n”.

source code:

#include<iostream>
#include<conio.h>
#include<iomanip>
#include<math.h>

using namespace std;
int main()
{
    int x,n,i=0;
    long int sum=0;
    cout<<"Enter base and power :  ";
    cin>>x>>n;cout<<endl;
    for(i=1;i<=n;i++)
    {
        sum=sum+(pow(x,i));
    }
    cout<<sum;
    getch();
    return 0;
}

Program to find SUM OF FACTORIAL upto n.

source code:

 

#include <iostream>
#include<conio.h>
#include<iomanip>

using namespace std;

int main()
{
    int number,i=1,sum=0;
    long int fact=1;
    cout<<"Enter a positive integer to find its factorial :  ";
    cin>>number;
    for(i=1;i<=number;i++)
        {
            fact=fact*i;
            sum=sum+fact;
        }

    cout<<number<<"! = "<<sum;
    getch();
}