Saturday, March 29, 2014

How to get facebook, twitter, youtube followers for free

Yes guys you can get free facebook followers, likers, sharers, and similarly for twitter as well as youtube also. This is a kind of traffic or like exchange site. click this banner to get free followers.

Like-Ex.Com
Read More »

Friday, March 28, 2014

PD-Proxy Bandwidth limit reached solution

PD-Proxy is the one of the best and most used VPN( Virtual Provate Network) around the world. Well, PD-Proxy trial has maximum of 100 mb/account per day for downloading and uploading. after using 100mb, bandwidth limit reaches in a trial account, So you need to upgrade your account to use more data and you also won't have any limit for using it, But you have to pay extra $5 per month.
In a trial account after using 100mb suddenly PD-Proxy disconnects and message occurs saying,

                                              Bandwidth limit reached!
     Please upgrade your account to premium to continue browsing!
                   Tunnel successfully connected!


Solution to the bandwidth limit reached in PD-Proxy:-

  1. First Download Volumeid.exe from here(It is an official program from microsoft ).
  2. Now extract and copy it to the C:\windows\system32 folder.
  3. Run command prompt with administrator privilage.
  4. type volumeid.exe C: xxxx-xxxx ( where x represents any number) (eg. volumeid.exe C: 5345-3435) and press enter.
  5. If you are doing this for first time a new popup window will open accept the license from microsoft.
  6. Exit the command prompt and restart the computer.
Now you can use again PD-Proxy after bandwidth limit reached. And make sure PD-Proxy account should be an another account not the same which has been reached its limit. Now enjoy surfing the internet.
Read More »

Wednesday, March 26, 2014

Constructor Example

#include<iostream.h>
#include<conio.h>
class Number
{
int m,n;
public:
Number();
void display()
{
cout<<"m = "<<m;
cout<<"n = "<<n;
}

};
Number::Number()
{
m=5;n=6;
}
void main()
{
Number num;
num.display();
   getch();
}
Read More »

Overloading Constructor Example

#include<iostream.h>
#include<conio.h>
class Number
{
int m,n;
public:
Number()//Non-Parameterisze Constructor.
{m=5;
n=6;  }
Number(int a, int b)//Parameterisze Constructor.
{
m=a;n=b;
}
Number (int a)//Parameterisze Constructor.
{m=n=a;
}
void display()
{
cout<<"M = "<<m;
cout<<"N = " <<n;
}
};
void main()
{
Number num;
Number num2(5);
Number num3(5,6);
num.display();
num2.display();
num3.display();
getch();
}

Read More »

Tuesday, March 25, 2014

Overloading Logical less Operator

//Overloading Logical Operator "<"

#include<iostream.h>
class Point
{
 private:
double M_dX, M_dY;
 public:
Point(double dX=0.0, double dY=0.0)
{
M_dX=dX;
M_dY=dY;
}
friend bool operator<(Point &P1, Point &P2);
};

bool operator<(Point &P1, Point &P2)
{
return(P1.M_dX<P2.M_dX && P1.M_dY<P2.M_dY);
}

int main()
{
Point P1(4.55,6.0), P2(4.55,6.0); //Change the value of argument however you like
if(P1<P2)
cout<<"P1<P2=True";
else
cout<<"P1<P2=False";
return(0);
}

Read More »

Inheritance example in C++

#include<iostream.h>
#include<conio.h>
class First
{
char name[40];
int age;
void getdata()
{
cout<<"Enter  Your name : ";
cin>>name;
cout<<"Enter Your age : ";
cin>>age;
}
public:
void display()
{
getdata();
cout<<"Your name is : "<<name;
cout<<"\nYour age is : "<<age;
}
};
class Second : public First
{
public:                                
void display2()
{
display();
}
}b;
int main()
{
b.display();
getch();
}
Read More »

Monday, March 24, 2014

C Tutorials

Read More »

Sunday, March 23, 2014

How to remove showing posts with label on blogger


  • Go to Blogger Template >> Edit HTML and Search for the below code
<b:includable id='status-message'>
  • Now Expand the code and replace with the below code.
<b:includable id='status-message'>
<b:if cond='data:navMessage'>
<div>
</div>
<div style='clear: both;'/>
</b:if>
</b:includable>

  • And save it.
Read More »

Saturday, March 22, 2014

How to remove subscribe to post atom

  • Go to Blogger Template >>Edit HTML and press ctrl+F and serach for this code 
<b:include data='feedLinks' name='feedLinksBody'/>
  • Now remove the above code and save it
Read More »

How to add Read more Post on Blogger


  • Go to Blooger Template >> Edit Html and Press ctrl+f and type this code <data:post.body/> and hit enter twice and replace this with below code.

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
  <script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
<span class='readmore' style='float:right'><a expr:href='data:post.url'>Read More &#187;</a></span></b:if></b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/></b:if>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'><data:post.body/></b:if>

  • Now search for </head> and just above </head> Paste the below code.
<script type='text/javascript'>
posts_no_thumb_sum = 490;
posts_thumb_sum = 400;
img_thumb_height = 120;
img_thumb_width = 120;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = posts_no_thumb_sum;
if(img.length>=1) {
imgtag = '<span class="posts-thumb" style="float:left; margin-right: 5px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = posts_thumb_sum;
}
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>
  • And save it.

Read More »

Friday, March 21, 2014

List of Nepali Band



  1. Nepathya
  2. 1974 AD
  3. Robin and the New Revolution
  4. Albatross
  5. Akarshan
  6. Antim Grahan
  7. Anuprastha
  8. Astha
  9. Axix
  10. Bidroha
  11. Bro-Sis
  12. Buds
  13. Catch 22
  14. Cobweb
  15. Crossroads (Sanjay Shrestha)
  16. Cruentus
  17. Blackout
  18. Deurali Band
  19. Dying Out Flame
  20. Horny Monks
  21. Jindabaad
  22. Jugaa
  23. The Lakhey
  24. Kandara
  25. Karma Band
  26. Kutumba Band
  27. Mantra
  28. Metal Cross
  29. Milestone
  30. Mukti N Revival
  31. Mongolian Hearts (Raju Lama)
  32. Monkey Temple
  33. Newaz
  34. Newa the King
  35. Navras 'N' The Students
  36. Okely
  37. Rockheads
  38. Seasons Band (Sujil Karmacharya)
  39. Sayaas
  40. Shannon Scam
  41. Sur Sudha
  42. Stings
  43. Prism
  44. The Himalayan Band
  45. The Axe
  46. The 11th Hour
  47. The Edge
  48. The Influence (Bhim Tuladhar)
  49. The Move (Dhiraj Rai)
  50. The Shadows
  51. The Uglyz
  52. The Yellow Hammer
  53. Underside[1]
  54. White
  55. X-Mantra
  56. Zenith
Read More »

How to remove older/newer/home link from Blog


  1. How to remove Newer posts link ?
  • Go to Template << Edit HTML << and search for following code.
#blog-pager-newer-link{background:
    • Now just copy the below code and paste after/below the #222;float:left;padding:4px} .
    #blog-pager-newer-link {display:none;}
    And save it.
         2. How to remove Older posts link ?
    • Search for following code.
    #blog-pager-older-link{background:
    • Now just copy the below code and paste after/beow the code #222;float:right;padding:4px}
    #blog-pager-older-link {display:none;}
    And save it.
          3.How to remove Home link ?

    •  search for following code.

    .home-link {background:
    • Now just copy the below code and paste after/below the #222;float:left;padding:4px} code.
    #blog-pager .home-link {display:none;}

    And Save it.
    Read More »

    How to change font size of posts on blogger


    • Go to Template >> Edit HTML >> and search for ".post-body{" (without quot).
    • then you will see following code.

    .post-body{margin:0px;padding:0px 16px 0px 0px;font-family:Arial, Helvetica, Sans-serif;font-size:15px;line-height: 20px;}
    • Now change 15 to your desired size.
    Read More »

    Thursday, March 20, 2014

    Overloading Logical 'Greater' or '>' Operator

    //Overloading Logical Operator ">"

    #include<iostream.h>
    class Point
    {
     private:
    double M_dX, M_dY;
     public:
    Point(double dX=0.0, double dY=0.0)
    {
    M_dX=dX;
    M_dY=dY;
    }
    friend bool operator>(Point &P1, Point &P2);
    };

    bool operator>(Point &P1, Point &P2)
    {
    return(P1.M_dX>P2.M_dX && P1.M_dY>P2.M_dY);
    }

    int main()
    {
    Point P1(6.0,7.1), P2(5.0,6.0); //Change the value of argument however you like
    if(P1>P2)
    cout<<"P1>P2=True";
    else
    cout<<"P1>P2=False";
    return(0);
    }
    Read More »

    How to remove Navbar from blog

    This is the tutorial of removing Navbar/Navigation from blog.

    • Go to Blogger Layout 
     click Edit on 'Navbar' 


    New window will open then choose OFF option from the list and click on save.



    ENJOY   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Read More »

    How to create the labels on post

    • Create a new post.


    • Now click on labels on the right side.


    Now type a labels . labels should be separated with commas.Then click done and publish the post.

       ENJOY  !!!!!!!!!!!!!!!!!!!!!!!!!!!
    Read More »

    How to add html / java script on blogger

    1. Log into your Blogger account. 

    2. Once logged in you will need to click on "Layout"

    3. Next you will need to decide where you would like to run Chitika ads on your Blogger site.

    4. When you have the desired location you will need to click on "Add a Gadget"

    5. You will then need to click on HTML/JavaScript to add JavaScript code to your site. 



    6. This will bring up a new window that you can copy and paste the ad code you have generated from the publisher panel into the "Content section." Once you have the code in this window you will need to click save.



    7. Next you will need to click "Save Arrangement" and you are done.


    Enjoy!!!!!!!!!!!!!!!!!!
    Read More »

    How to create a Blog with Blogger

    You must have gmail account for creating a blog with blogger. Don't have a gmail account ? create NOW
    After creating Gmail account go to Blogger.com

    Enter your gmail ID and password on required field. eg.
    and click on sign in button.

    Now click on 'New Blog' and choose title of your blog and address of your blog.



    choose a template and click on 'create blog!'.



    Now your blog has been successfully created. Enjoy!!!!!
    Read More »

    Wednesday, March 19, 2014

    Overloading Logical Operator "<="

    //Overloading Logical Operator "<="

    #include<iostream.h>
    class Point
    {
     private:
    double M_dX, M_dY;
     public:
    Point(double dX=0.0, double dY=0.0)
    {
    M_dX=dX;
    M_dY=dY;
    }
    friend bool operator<=(Point &P1, Point &P2);
    };

    bool operator<=(Point &P1, Point &P2)
    {
    return(P1.M_dX<=P2.M_dX && P1.M_dY<=P2.M_dY);
    }

    int main()
    {
    Point P1(6.0,7.1), P2(7.0,7.1); //Change the value of argument however you like
    if(P1<=P2)
    cout<<"P1<=P2=True";
    else
    cout<<"P1<=P2=False";
    return(0);
    }
    Read More »

    Overloading Logical equal Operator

    //Overloading Logical Operator "==" & "!="

    #include<iostream.h>
    class Point
    {
     private:
    double M_dX, M_dY;
     public:
    Point(double dX=0.0, double dY=0.0)
    {
    M_dX=dX;
    M_dY=dY;
    }
    friend bool operator==(Point &P1, Point &P2);
    friend bool operator!=(Point &P1, Point &P2);
    };

    bool operator==(Point &P1, Point &P2)
    {
    return(P1.M_dX==P2.M_dX && P1.M_dY==P2.M_dY);
    }

    bool operator!=(Point &P1, Point &P2)
    {
    return!(P1==P2);
    }

    int main()
    {
    Point P1(4.55,6.0), P2(4.55,6.0);
    if(P1==P2)
    cout<<"P1==P2=True";
    else
    cout<<"P1==P2=False";
    return(0);
    }
    Read More »

    Tuesday, March 18, 2014

    simple example to record student info in C++

    #include<iostream.h>
    class student
    {
    char name[50],add[60];
    int roll,grade;
    public:
    void getdata()
    {
    cout<<"Enter your name : ";
    cin>>name;
    cout<<"\nEnter your Roll no : ";
    cin>>roll;
    cout<<"\nEnter your Class : ";
    cin>>grade;
    cout<<"Enter your address : ";
    cin>>add;
    }
    void display()
    {
    cout<<"\nname : "<<name;
    cout<<"\nRoll no : "<<roll;
    cout<<"\nAddress : "<<add;
    cout<<"\nClass : "<<grade;
    }
    }s[10];
    int main()
    {
    int i;
    for(i=0;i<2;i++)
    s[i].getdata();
    for(i=0;i<2;i++)
    {s[i].display();
    }
    return 0;
    }
    Read More »

    Overloading Logical Operator ">="

    //Overloading Logical Operator ">="

    #include<iostream.h>
    class Point
    {
     private:
    double M_dX, M_dY;
     public:
    Point(double dX=0.0, double dY=0.0)
    {
    M_dX=dX;
    M_dY=dY;
    }
    friend bool operator>=(Point &P1, Point &P2);
    };

    bool operator>=(Point &P1, Point &P2)
    {
    return(P1.M_dX>=P2.M_dX && P1.M_dY>=P2.M_dY);
    }

    int main()
    {
    Point P1(6.0,7.1), P2(6.0,5.4); //Change the value of argument however you like
    if(P1>=P2)
    cout<<"P1>=P2=True";
    else
    cout<<"P1>=P2=False";
    return(0);
    }
    Read More »

    Saturday, March 15, 2014

    How to install jar files on android device

    Jar files and android files both are java based programs. Before arriving of android most of the people used to use jar programs. but now people use android devices in their daily life. But what happens to those people who uses android but have addicted to jar programs? for overcoming this problems there are many more jar emulator for android devices. But JBED is the best emulator for using jar programs on android devices.
    • What is JBED?
    JBED is an android program which emulates the jar programs and makes jar files run on android devices.
    • How to use jar programs with JBED ?
    1. Download JBED from here.
    2. Download 'jbedvm.so' from here and place it in 'system\lib' folder.
    3. Install JBED but donot run it.
    4. Restart the phone then Launch JBED application. 
    5. Press menu button and choose SD card.
    6. Select your .JAR/.JAD file that you want to install and run.
    7. Now install the chosen application through JBED.
    8. Now open the installed java application to run. .
    Now you are done !!! You can use your favorite jar files on your android.
    Read More »

    Earn with Probux


    What is Probux?
      Probux is a PTC(Pay To Click) site. which pays you money, if you visit other sites through it. And it also provide the quality traffic to your site if you have become a advertiser, paying certain amount of money.
      • How can we earn money with probux?
      Probux has great tasks and many more option for earning:
      1. viewing ads:-There is a four(4) fixed ads, from where you can easily earn $0.01 per each ad(means $0.04 per day).there are many more other ads, which pays you upto $0.005 per each ad.
      2. Progrid:-It is kind of a lucky game. There are twenty(20) chances per day. You can win upto $5(But this is in a rare case).
      3. Direct Referrals:-You can earn by referring your friend and others to signup and click ads in a probux. You both can earn from this method.
      4. Rented referrals:-This is a great feature of Probux. You can rent your account to others. If you have rental referrals you can earn upto 50% of their earning doing nothing or you can make upto $2 per day.
      5. Crowd flowers:- crowd flowers is a company, which undertakes the different projects and tasks and place them onto probux.Every projects will have a different payout rates. If you earned $50 you will be crowned by $5.

      You can double your income by upgrading your membership to premium account.
      • Payment processes:
      there are two processes Paypal and Payza.



      Read More »

      Wednesday, March 12, 2014

      swap numbers by using call by reference in C++

      #include<iostream.h>
      int swap(int &a, int &b)
      {
      int t=a;
      a=b;
      b=t;
      }
      int main()
      {
      int x=5; int y=67;
      cout<<"Before swap : "<<x<<"\t"<<y<<"\n";
      swap(x,y);
      cout<<"\nAfter Swap: "<<x<<"\t"<<y<<"\n";
      return 0;
      }
      Read More »

      swap numbers in C++

      #include<iostream.h>
      #include<conio.h>
      int main()
      {
      int a,b,t;
      cout<<"Enter First Number : ";
      cin>>a;
      cout<<"\nEnter Second Number : ";
      cin>>b;
      cout<<"Before Swaping : "<<a<<"\t"<<b;
      t=a;
      a=b;
      b=t;
      cout<<"\n After Swaping : "<<a<<"\t"<<b;
      getch();
      }
      Read More »

      Tuesday, March 11, 2014

      C program to implement Queue using Function

      #include<stdio.h>
      #include<windows.h>
      #include<conio.h>
      #define SIZE 5
      int insert();
      int deletedata();
      int display();
      struct Queue
      {
      int queue[SIZE];
      int front, rear;
      }s;
      int main()
      {
      s.front=0;
      s.rear=0;
      int ch;
      while(1)
      {
        printf("\n1.Insert Data\n2.Delete Data\n3.Display Data\n4.Exit\n\t");
        printf("Enter your choice : ");
        scanf("%d", &ch);
        switch(ch)
        {
      case 1:
      insert();
      break;
      case 2:
      deletedata();
      break;
      case 3:
      display();
      break;
      case 4:
      system("exit");
      break;
      default:
      printf("Invalid Choice ");
      }
        }
      getch();
      }
      int insert()
      {
      int n;
      if(s.front==(SIZE-1))
      printf("Queue Is full");
      else
      {
      printf("Enter the element : ");
      scanf("%d",&n);
      s.queue[s.rear]=n;
      s.rear++;
      }
      }
      int deletedata()
      {
      int n;
      if(s.front==s.rear)
      printf("The Queue is Empty ");
      else
      {
      printf("Enter the element to be deleted ");
      scanf("%d", &n);
      n=s.queue[s.front];
      printf("Deleted Element is %d",s.queue[s.front]);
      s.front++;
      }
      }
      int display()
      {int i;
      if(s.front==s.rear)
      printf("The queue is Empty");
      else
      {
      printf("The elements of Queue are : ");
      for(i=s.front;i<s.rear;i++)
      printf("%d",s.queue[i]);
      }
      }
      Read More »

      Monday, March 10, 2014

      Simple Example Program Of Copy Constructor Overloading In C++

      //Program For Simple Example Program Of Copy Constructor Overloading In C++
      #include<iostream>
      #include<conio.h>
      using namespace std;
      class Code        {
          // Variable Declaration
          int a,b;
          public:

          //Constructor with Argument
          Code(int x,int y)            {

          // Assign Values In Constructor
          a=x;
          b=y;
          cout<<"\nCopy Constructor";
          }

          void Display()    {
          cout<<"\nValues :"<<a<<"\t"<<b;
          }
      };

      int main()                {
              Code Object(10,20);

              //Copy Constructor
              Code Object2=Object;

              // Constructor invoked.

              Object.Display();
              Object2.Display();
              getch();
      }
      Read More »

      Sunday, March 9, 2014

      class example in C++

      #include <iostream.h>
      class Person
      {
      char name[50];
      int age;
      public: // makes member function public, so that which can be accessibled.
      int getdata()
      {
      cout<<"Enter Your Name : ";
      cin>>name;
      cout<<"Enter Your Age : ";
      cin>>age;
      }
      int display()
      {
      cout<<"Your Name is : "<<name<<"\n";
      cout<<"And Your age is : "<<age<<"\n";
      }
      };//End of class.
      int main()
      {
      Person p;//variable of class declared.
      p.getdata();
      p.display();
      return 0;
      }
      Read More »

      Friday, March 7, 2014

      C program to implement Stack operation

      #include<stdio.h>
      #include<windows.h>
      #define MAXSIZE 5

      struct stack
      {
          int stk[MAXSIZE];
          int top;
      }s;

      void push();
      int  pop();
      int display();

      int main ()
      {
          int choice;
          char a;
          s.top =0;

          printf ("\t\tSTACK OPERATION\n");
          while (1)
          {

         printf ("\n");
              printf (" 1.PUSH\n");
              printf (" 2.POP\n");
              printf (" 3.DISPLAY\n");
              printf (" 4.EXIT\n");
              printf ("------------------------------------------\n");

              printf("Enter your choice : ");
              scanf("%d", &choice);
              switch (choice)
              {
              case 1:
                  push();
                  break;
              case 2:
                  pop();
                  break;
              case 3:
                  display();
                  break;
              case 4:
           exit(0);
                  break;
                  default:
              printf("Invalid Option");
              }
         }
          }
      void push ()
      {
          int num;
          if (s.top==(MAXSIZE - 1))
          {
              printf ("Stack is Full\n");
          }
          else
          {
              printf ("Enter the element to be pushed : ");
              scanf ("%d", &num);
              s.top = s.top + 1;
              s.stk[s.top] = num;
          }
          return;
      }
      int pop ()
      {
         int num;

          if (s.top==0)
          {
              printf ("Stack is Empty\n");
          }
          else
          {
          printf("Enter the element to be popped : ");
      scanf("%d", &num);
              num = s.stk[s.top];
              printf ("poped element is = %d", s.stk[s.top]);
              s.top=s.top-1;
          }
      }
      int display ()
      {
          int i;
          if (s.top==0)
          {
              printf("Stack is empty\n");
          }
          else
          {
         printf ("\n The status of the stack is : ");
              for (i=1;i<=s.top;i++)
              {
                  printf ("%d   ", s.stk[i]);
              }
          }
      }
      Read More »

      Monday, March 3, 2014

      Sum or Addition in C++

      #include <iostream>
      using namespace std;
      int main()
      {
         int a, b, c;
         cout << "Enter two numbers to add\n";
         cin >> a >> b;
         c = a + b;
         cout <<"Sum of entered numbers  is = " << c << endl;
         return 0;
      }
      Read More »

      Hello world program in C++

      #include<iostream>
      using namespace std;
      int main()
      {
      cout << "Hello World\n";
      return 0;
      }
      Read More »

      C Program to check whether anagrams or not

      #include <stdio.h>

      int check_anagram(char [], char []);

      int main()
      {
         char a[100], b[100];
         int flag;

         printf("Enter first string\n");
         gets(a);

         printf("Enter second string\n");
         gets(b);

         flag = check_anagram(a, b);

         if (flag == 1)
            printf("\"%s\" and \"%s\" are anagrams.\n", a, b);
         else
            printf("\"%s\" and \"%s\" are not anagrams.\n", a, b);

         return 0;
      }

      int check_anagram(char a[], char b[])
      {
         int first[26] = {0}, second[26] = {0}, c = 0;

         while (a[c] != '\0')
         {
            first[a[c]-'a']++;
            c++;
         }

         c = 0;

         while (b[c] != '\0')
         {
            second[b[c]-'a']++;
            c++;
         }

         for (c = 0; c < 26; c++)
         {
            if (first[c] != second[c])
               return 0;
         }

         return 1;
      }
      Read More »

      C Program to generate Armstrong Numbers

      #include <stdio.h>
       
      int main()
      {
         int r;
         long number = 0, c, sum = 0, temp;
       
         printf("Enter an integer upto which you want to find armstrong numbers\n");
         scanf("%ld",&number);
       
         printf("Following armstrong numbers are found from 1 to %ld\n",number);
       
         for( c = 1 ; c <= number ; c++ )
         {
            temp = c;
            while( temp != 0 )
            {
               r = temp%10;
               sum = sum + r*r*r;
               temp = temp/10;
            }
            if ( c == sum )
               printf("%ld\n", c);
            sum = 0;
         }
       
         return 0;
      }
      Read More »

      C program to print Floyd's triangle

      #include <stdio.h>

      int main()
      {
        int n, i,  c, a = 1;

        printf("Enter the number of rows of Floyd's triangle to print\n");
        scanf("%d", &n);

        for (i = 1; i <= n; i++)
        {
          for (c = 1; c <= i; c++)
          {
            printf("%d ",a);
            a++;
          }
          printf("\n");
        }

        return 0;
      }
      Read More »

      Multiply Two matrix from C

      #include <stdio.h>

      int main()
      {
        int m, n, p, q, c, d, k, sum = 0;
        int first[10][10], second[10][10], multiply[10][10];

        printf("Enter the number of rows and columns of first matrix\n");
        scanf("%d%d", &m, &n);
        printf("Enter the elements of first matrix\n");

        for (  c = 0 ; c < m ; c++ )
          for ( d = 0 ; d < n ; d++ )
            scanf("%d", &first[c][d]);

        printf("Enter the number of rows and columns of second matrix\n");
        scanf("%d%d", &p, &q);

        if ( n != p )
          printf("Matrices with entered orders can't be multiplied with each other.\n");
        else
        {
          printf("Enter the elements of second matrix\n");

          for ( c = 0 ; c < p ; c++ )
            for ( d = 0 ; d < q ; d++ )
              scanf("%d", &second[c][d]);

          for ( c = 0 ; c < m ; c++ )
          {
            for ( d = 0 ; d < q ; d++ )
            {
              for ( k = 0 ; k < p ; k++ )
              {
                sum = sum + first[c][k]*second[k][d];
              }

              multiply[c][d] = sum;
              sum = 0;
            }
          }

          printf("Product of entered matrices:-\n");

          for ( c = 0 ; c < m ; c++ )
          {
            for ( d = 0 ; d < q ; d++ )
              printf("%d\t", multiply[c][d]);

            printf("\n");
          }
        }

        return 0;
      }
      Read More »