Saturday, September 19, 2015

HOW TO SWAP TWO NUMBER ?

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a = 10, b= 20, temp;

cout<<"Before Swapping"<<endl<<a<<"\t"<<b<<endl<<endl;

temp=a;
a=b;
b=temp;

cout<<"After Swapping"<<endl<<a<<"\t"<<b<<endl<<endl;

getch();
}

visit : www.indiaknow.com

Friday, September 18, 2015

How to create an Array?

#include<iostream.h>
#include<conio.h>
int main()
{
    int N , arr[100] ;
    
   cout << "How many elements, Do you want in the array (Maximum elements 100) : ";
   cin >>N;

   for(int i=0;i<N;i++)  //for loop to enter array elements
   { 
      cin>>arr[i];
   }

   cout << "Array Element are : \n\n";

  for(int i=0;i<N;i++)  //for loop to display array elements
   { 
      cout<<arr[i]<<endl;
   }
return 0;
}

Please also Visit : www.indiaknow.com

Thursday, September 17, 2015

Regrets on not publishing

Hey, friends! I was little busy with my life and now that  I am free, I have decided to make this blog go live for once again. I will keep this blog updated with C++ programs and projects so that I can help, a large number of needy students. Stay connected!!!!!!!

www.indiaknow.com