Tuesday, 22 January 2013

Program to insert number into an array

| |
0 comments













#include<iostream>

using namespace std;

int main()
{
    int x,n,p[n],q[n],i,j,a;
    cout<<"Enter the number of elements in array :""\n";
    cin>>n;
    cout<<"Enter "<<n<<" integers in ascending or descending order:\n";
    for(i=1;i<=n;i++)
    {
                    cin>>x;
                    p[i]=x;
                    q[i]=x;
                    }
    cout<<"Enter the no. you want to insert :""\n";
    cin>>a;
    for(i=1;i<=n;i++)

    {
                    if(p[i]>a)
                    {
                                  break;
                                  }
                                  }
    p[i]=a;
    for(j=i+1;j<=n+1;j++)
    {
                         p[j]=q[j-1];
                         }
 
    for(i=1;i<=(n+1);i++)
    {
                         cout<<p[i]<<"\n";
                         }
    system("pause");
    return 0;
}
   

Read More

Friday, 18 January 2013

C++ program to print star pattern

| |
0 comments

#include<iostream>
#include<math.h>
using namespace std;

int main()
{
    int i,j,k,l,n,m;
    cout<<"Enter the number of rows :""\n";
    cin>>n;
   
    for(i=0;i<n;i++)
    {
                    cout<<"\n";
                    for(k=(n-i);k>0;k--)
                    { cout<<" ";}
                    if(i==0)
                    {
                            cout<<"*";
                            continue;}
                    if(i==(n-1))
                    {
                            for(j=0;j<((2*n)-1);j++)
                            { cout<<"*";}
                           
                    break;
                    }
                    cout<<"*";
                   
                    for(l=fabs(2*i-1);l>0;l--)
                    {
                                              cout<<" ";
                                              }
                    cout<<"*";
                    }
                   
                    cout<<"\n";
    system ("pause");
    return 0;
}
                   

Read More

C ++ program to print ABC in Matrix

| |
0 comments

#include<iostream>

using namespace std;

int main()
{
    char x=65;
    int i,j,n;
    cout<<"Enter the number of rows :""\n";
    cin>>n;
    for(i=0;i<n;i++)
    {
                cout<<"\n";
                for(j=i;j>=0;j--)
                {
                                 cout<<x;
                                 x=x+1;
                                 }
                x=65;
                                }
                cout<<"\n";
     system ("pause");
     return 0;
     }    

Read More

Thursday, 17 January 2013

Linear search c plus plus program

| |
0 comments

#include<iostream>

using namespace std;
int main()
{ int sc[100],n,count=0,y;
cout<<"How many numbers u want to enter?";
cin>>y;
cout<<"Enter the numbers";

for(int i=0; i<y; i++)
{cin>>sc[i];}
cout<<"Enter a number for the query! ";
cin>>n;
for(int j=0; j<y;j++)
{if(sc[j]==n)
{
count=count+1;
}}
if(count==1)
{
            cout<<"The requred query "<<n<<" is found! \n";
            }
else
{
cout<<"The required query cannot be found! \n";}

system ("pause");
return 0;}

Read More

Function for Cube

| |
0 comments

#include<iostream>

using namespace std;

int main()
{
int cube();
int area();
cout<<"The Cube is \n"<<cube();
cout<<"The area is \n" <<area();

system ("pause");}
int cube()
{int a,x;
cout<<"Enter the side for which the cube is foind\n";
    cin>>a;
   
    x=a*a*a;
    return x; }
   
   int area()
   {int b,y;
   cout<<"\nEnter the side\n" ;
   cin>>b;
   y=b*b;
   return y;}
   

Read More

Function ( Binary and Linear Search)

| |
0 comments

#include<iostream>

using namespace std;

int main()
{
int linearsearch();
int binarysearch();
cout<<"The number found via linear search\n"<<linearsearch();
cout<<"The number found via Binary search\n" <<binarysearch();

system ("pause");}
int linearsearch()
{int sc[100],n,count=0,y;
cout<<"How many numbers u want to enter?";
cin>>y;
cout<<"Enter the numbers";

for(int i=0; i<y; i++)
{cin>>sc[i];}
cout<<"Enter a number for the query! ";
cin>>n;
for(int j=0; j<y;j++)
{if(sc[j]==n)
{
count=count+1;
}}
if(count==1)
{
            cout<<"The requred query "<<n<<" is found! \n";
            }
else
{
cout<<"The required query cannot be found! \n";}
    return y; }
   
   int binarysearch()
   {int a[10],n,beg,end,mid,x;
cout<<"\nNo of element in array\t";
cin>>n;
cout<<"enter the element\n";
for(int i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"\nenter item to be searched\t";
cin>>x;
beg=0;end=n;
mid=(beg+end)/2;
while(beg<=end&&a[mid]!=x)
{
if(x<a[mid])
{
end=mid-1;
}
else
{
beg=mid+1;
}
mid=(beg+end)/2;
}
if(a[mid]==x)
{
cout<<"\nItem found at location "<<mid+1;
}
else
{
cout<<"\nItem not found";
}
   return x;}
   

Read More

Fibbonacci Series C ++ program

| |
0 comments

#include<iostream>


using namespace std;

int main()
{
   
    int a,b,c,i,n;
    cout<<"Upto How many elements " <<endl;
    cin>>n;
    cout<<"a : ";
    cin>>a;
    cout<<"b : ";
    cin>>b;
 
   
    for (i=0;i<n;i++)
{ c=a+b;
    a=b;
b=c;
cout<<c;}

system ("pause");

}

Read More

Factorial c plus plus program

| |
0 comments

#include<iostream>


using namespace std;
int main()
{

int a[10],n,beg,end,mid,x;
cout<<"\nNo of element in array\t";
cin>>n;
cout<<"enter the element\n";
for(int i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"\nenter item to be searched\t";
cin>>x;
beg=0;end=n;
mid=(beg+end)/2;
while(beg<=end&&a[mid]!=x)
{
if(x<a[mid])
{
end=mid-1;
}
else
{
beg=mid+1;
}
mid=(beg+end)/2;
}
if(a[mid]==x)
{
cout<<"\nItem found at location "<<mid+1;
}
else
{
cout<<"\nItem not found";
}
system ("pause");
return 0;
}

Read More

Binary Search C plus plus program

| |
0 comments

#include<iostream>


using namespace std;
int main()
{

int a[10],n,beg,end,mid,x;
cout<<"\nNo of element in array\t";
cin>>n;
cout<<"enter the element\n";
for(int i=0;i<n;i++)
{
cin>>a[i];
}
cout<<"\nenter item to be searched\t";
cin>>x;
beg=0;end=n;
mid=(beg+end)/2;
while(beg<=end&&a[mid]!=x)
{
if(x<a[mid])
{
end=mid-1;
}
else
{
beg=mid+1;
}
mid=(beg+end)/2;
}
if(a[mid]==x)
{
cout<<"\nItem found at location "<<mid+1;
}
else
{
cout<<"\nItem not found";
}
system ("pause");
return 0;
}

Read More

2d Array program

| |
0 comments

#include<iostream>

using namespace std;
int main()
{
    int array[3][3], a ,b,x,y;
    cout<<"Enter the no. for the 2D arrays seperated by space :\n";
    for(int n=0; n<3; n++)
    {
            for (int i=0;i<3;i++)
    {cin>>array[n][i]  ;
  }}
   
    for(int n=0; n<3; n++)
    {cout<<"\n";
            for (int i=0;i<3;i++)
            {
                cout<<array[n][i];
                }}
   
system ("pause");
return 0;
}

Read More

Thursday, 10 January 2013

Free Internet Hack for Airtel 2013 (Working For Mobile And PC)

| |
5 comments

UPDATE: Latest 2013 trick is here, click me.
This is my first post of this year 2013. I wish you all a very happy new year. This year is going to bring a cyber-revolution all over the world. Starting from the world of mobile/Phablets to Android based smart TV and Folding paper tablets everything is going to be revolutionized at a very rapid rate. All these leading to where? A REVOLUTIONIZED TECH WORLD 2013. Today I am sharing with you a very 100% working trick for Airtel, Thank God its evergreen All over the country (At a nil balance – I would prefer). Before getting into my original talk I would like to discuss with you all a very easy trick to browse Facebook freely with Airtel without any setting. Follow the steps carefully-
Ø  Connect your Airtel Mobile or Modem to PC with your PC suite / Modem Firmware.
Ø  After connecting open any browser then go to www.facebook.com directly.
Ø  If that does not works then go to www.0.facebook.com.
Ø  You will always have a free time access to go to fb anytime you wish and that too free of cost.
But Facebook is not all we need. I like browsing rather than surfing fb. So in the process of discovering my interest, I have found something interesting – the evergreen trick which works all over the country.
Follow the Screenshots carefully:(IMAGES WILL BE PUT SHORTLY)
·         Connect your Airtel connection with your normal settings.

·         Now the real trick starts: Open Mozilla Firefox, Go to:
·         Click on options>>Advanced>>Network>>Settings
·         Click on Manual Proxy configuration with HTTP proxy as – zacebook.com : port 80
·         Click OK
·         Now go to General Tab Under Options
·         Set the Homepage as http://203.115.112.5/index.php And click OK.

That’s it Now browse Internet for free And also DOWNLOAD for free.But remember it works only on pc . IF YOU WANT TO ENJOY FREE INTERNET ON MOBILE THEN COMMENT BY SUBMITTING YOUR MAIL ID.The Mobile trick is Here:

All u have to do is download uc browser and set the proxy as given
zacebook.com : port 80
now go to http://203.115.112.5/index.php  and browse for free enjoy
www.way2hack.org
Thanks and enjoy!
Read More
Related Posts Plugin for WordPress, Blogger...
Powered by Blogger.