Suppose you write a code that generate a set of 50 random numbers in the range 1 to 100. Now you would like to count the frequency of the number that your code has generated. Well there are lots of other ways. But today I will discuss about how you can use c++11 to do the trick. Continue reading
Previously I have posted a similar post on how to print diamond shape using asterisks in c/c++
Some of you have asked me if there is any other way to solve this diamond shape asterisks problem. Of course Continue reading
Today I am not gonna solve any text book based programme. Let’s have some Fun.
We are going to write a programme which continuously open & close CD / DVD tray.
We’ll use it to make a ‘AUTOMATED MECHANICAL ROCKER’ for the babies 😛 . Before we proceed, let’s take a look at the video. You’ll get a hint that what we are going to do with this programme 😀 Continue reading
Today I would like to discuss about “How to calculate the factorial of an integer number”. In mathematics factorial of a non-negative number is denoted by . Where Example : . In C++ we can calculate it Continue reading
Update: I wrote this post back in 2009. I don’t maintain this blog anymore. Since there are lots of people still visiting this post and asking questions, I thought it would be a good idea to rewrite it. So I moved this post here. I have also added some brief explanation and some new shape using asterisks.
Please visit here for updated post. 🙂
It is a very common question for both C and C++ programmers that printing a diamond shape using asterisks (*) and this question is asked in almost every freaking semester 😉 .There are a lot of different ways to do that. But among them I found this one easier. Continue reading
Let us consider a very simple function . And your assignment is to solve it using c++. How can you do it? Just take a look-
If you want to calculate the sum of a series of numbers. Let’s starts with a very simple series i.e. . Here is how you can do it. Continue reading
Today I am going to discuss about one of the most popular and most simple C++ program. This is also my first program in C . This code is soo simple and only gives you one output “Hello World” .Let’s starts programming, shall we? :D- Continue reading
A C/C++ program is a collection of commands, which tell the computer to do “something”. This collection of commands is usually called C++ source code.
C/C++ seems to be a strange name for a programming language . But this strange sounding language is one of the most popular language today.
C was invented by Dennis Ritchie in 1972 and it was developed Continue reading