C++ Program to Separate Digits of a Positive Integer

Seperate digits of a positive integers Suppose you want to write a program in C++ which will take a positive integer from the user and output its individual digits. For example, if the input provided is 12345 then it will print 1,2,3,4 and 5 separately as integers. In this article we shall look at a few different ways of accomplishing exactly this.

First of all, look at the following program. It is probably the simplest way of separating digits of an integer. It makes use of the fact that when the division operator (/) is used with two integer operands then it gives us only the whole part of the quotient and the remainder operator (%) gives us the remainder when dividend is divided by the divisor. In this particular case, we use 10 with both these operators as divisor. When we use it with the remainder operator we get the last digit of the number entered by the user and when we use it with the division operator then we get the original number without that last digit. In this way, repeating these two steps until the original number becomes zero, we get each individual digit of the original number form right to left i.e. from least significant to most significant digit. Continue reading C++ Program to Separate Digits of a Positive Integer

How to get permalink of a post on Facebook?

So, you want to point your friends on facebook to a specific post but you can’t find a way to share that post with them via a button or link in the vicinity of that post. Or, suppose you are taking part in a contest on a company’s facebook page or group and you want to deliver maximum likes or comments on a certain post of you there. Then you would certainly want yourself to be able to give your friends the exact URL of that post. Unfortunately, I don’t find any clearly available option to get such a permalink for any post on facebook. Whenever you get a notification about a new comment or like on a post you are subscribed to and you click on that notification then that is the permalink that I always wished I could get without going through the notifications. Luckily, I found the following hidden trick to get it. The permalink of any post on facebook is hidden under its time stamp. So to get the permalink of any post, click on its time stamp reading “x hours ago”, “x seconds ago”, “a few minutes ago” etc. depending on the time passed since that post has been posted as shown in the following screen shot. Continue reading How to get permalink of a post on Facebook?

How to enable Welcome Screen in Adobe Illustrator CS5

Default setting in Adobe Illustrator CS5 is to hide the Welcome Screen (Well, I don’t know why 🙂 ?). However, some people find it really helpful in their day to day work flow to have it open when no other document is open for editing. So, if you are one of those people then don’t worry. It is extremely easy to enable it so that it will show every time you start illustrator until you don’t open a document or create a new one. Also it will reappear if at sometime you close all of the open documents in your workspace. To enable it, follow the two simple steps given below:

  1. In the menu bar click on Help > Welcome Screen, with no document open. The welcome screen will appear in the middle of the window.
    Adobe Illustrator Welcome Screen
  2. Click once on the check box besides “Don’t show again” to un check it in the lower left hand corner of the welcome screen to enable it for future. Continue reading How to enable Welcome Screen in Adobe Illustrator CS5

Does traffic exchange websites help in affiliate marketing?

I signed up on some traffic exchange websites like hit2hit, leadclub etc. a few days ago and now I am getting a good amount of traffic on my personal website which is in turn helping my website in SEO. But I am asking this question because I have noticed that on these traffic exchange platforms, most people click on the link of website, wait it to load while they continue to do their other tasks on their computer. After a while when the minimum time required to get credit passes, they go back to their browser and confirm their visit of that website by clicking on the appropriate image or by following any other confirmation method of that particular traffic exchange website.

In short, I think that traffic obtained from these sources doesn’t give us “readers”. Am I right in my imagination? If yes, then do you think some one from such kind of traffic is going to buy something from a company if I become their affiliate and put my affiliate link in rotation on such a website?

And most importantly if anyone of you has personal experience of affiliate marketing on traffic exchange websites then please share some of your statistics with me. For example, on average, how much visits you had to deliver to make a sale? I mean a rough hits/sale ratio If you don’t mind.

Thank you very much in advance!!

Recursive C++ Program to Convert a Decimal Integer into Binary Number

Here is a very simple and recursively written C++ program to convert a decimal integer number into its binary equivalent. However it returns the binary equivalent in the form of a string of characters but you can very easily write an other function to convert this string into an actual binary number as well. Continue reading Recursive C++ Program to Convert a Decimal Integer into Binary Number