Wake Up! Look Into The Mirror. You’re Beautiful!
Thursday, March 06, 2014
Monday, March 03, 2014
Theory: A prime number is one which is divisible by one and itself i.e. if a prime number is divided by any number except 1 or itself, it doesn't give a 0 as remainder.
The code would be as follows:
int num, i, another;
printf("Enter the number: ");
while (i<= num-1)
if (num %i==0)
printf("Number is not prime");
printf("Number is prime\n");
Thursday, February 27, 2014
AIM: To ask the user to enter a number and check whether that number is even or odd.
Theory: Well, let's see what would be the logic behind the program. A number is said to be even if it's divisible by two else it's odd.
Clearly, we can do this through if else statement in C. We will divide the number by 2 and check if modulus is equal to 0 or not.
Here's the code:
//Program To Check Whether The Number is Even or Odd
int main ()
printf("Enter The Number: ");
printf("The number is even");
printf("The number is odd");
In the program, we take the input from user using scanf function and then use if else statement to check the condition.
Friday, February 21, 2014
Chapter 1: Another Story
Wednesday, February 12, 2014
First of all, the title and concept of this post isn't mine. It's the idea of a very loyal reader of my blogs and a very nice guy who also loves to write and read books. He sent me an article talking about happiness. What kind of things make us happy? How they're different at present than our childhood days? How the entire meaning of happiness has changed while we were growing up?
The article really touched a chord for that is something which I had been noticing too. I have been thinking how I myself have changed the meaning of happiness. The same happens with almost all of us, I suppose.
There was a time when a small candy was enough to make us happy. Now, even a lunch in Buffet Hut seems less. There was a time when a small toy would bring us joy but now, even a phone of Rs. 5000 seems too less.
Everything has changed. We have changed and guess what, we don't even notice that unless someone compels us to introspect and see what has changed and what hasn't. Do we?