Showing posts with label tricky code. Show all posts
Showing posts with label tricky code. Show all posts

March 5, 2011

C Program to Find Out the Leap Year

This code is shared by Deepak Gupta, thanks for your contribution. share your code with us we will post them here..

A leap year (or intercalary or bissextile year) is a year containing one extra day.
Here is the Program to check whether a given year is leap year or not.

Output:

Eter the year:
2011
year 2011 is not a leap year.

February 15, 2011

Funny C Program


Here is one more tricky code, its so simple and funny.
Compile and then give anything in input and see if its funny or not.

February 5, 2011

C Program to Round Up a Number


This program is shared by Krunal Panchal, thanks for your contributions. Feel free to submit your program's to be posted on my c files.

This is a program for rounding up and down float values in c

For e.g if you have got float value of 8.5 then it is converted in to 9 and when you have got float value of 8.4 then it would be converted into 8.
Same way for any float value it could be converted to round up value into an integer.

C Program to Print HELLO WORLD Without Using Semicolon


After Program to Print HELLO without HELLO , Here is another program to print HELLO WORLD Without Using Semicolon (;).

To see the output:  compile the code by Ctrl+F9 and then run it by  Alt+F5

C++ Program to Convert Digits to its Equivalent Words


Here is another tricky code, where we can Convert Digits to its Equivalent Words.

The program work till 5 digits of number

Suppose the Input is: 12345

Then the Output will be:  OneTwoThreeFourFive

C Program for Multiplication without Using Multiply Operator *


Here is another program from the series tricky code. Here I am going to show you how we can do Multiplication without using Multiply Operator *. Programs like this you will rarely get anywhere else.

Comment below to express your feeling  and suggest me new idea for more tricky code.

Calender in C


Here is a c++ program for calender. where u can find any date up to year 32500 ..



















Copy this code and save it as calender.cpp

February 4, 2011

C Program to Print HELLO without HELLO


Here we are going to print HELLO without using any of the later from the HELLO, anywhere in the programing. Just think before proceeding further how we can do this..

Well here is the answer; here we are using ASCII CODE of the character to print HELLO.

ASCII TABLE OF ALPHABETS



Twitter Delicious Facebook Digg Stumbleupon Favorites More