0% found this document useful (0 votes)
98 views

WWW - Technocode.Co - In: Get More Programming Techniques and Improve Your Basics Books Don'T Teach This Only On

TechnoCode.co.in brings you Basic Programming Techniques...Learn and code like a real programmer along with Source Code download

Uploaded by

Ankit Goyal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

WWW - Technocode.Co - In: Get More Programming Techniques and Improve Your Basics Books Don'T Teach This Only On

TechnoCode.co.in brings you Basic Programming Techniques...Learn and code like a real programmer along with Source Code download

Uploaded by

Ankit Goyal
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

www.TechnoCode.co.

in
Basic Programming Techniques: Code like a programmer
Code 1
Technique to add first ten natural numbers.

Problem Description:
First 10 natural numbers include 1,2,3,....,10. We have to add
them all. Here we need a technique by which we can get all the
natural numbers. one at a time so that we can add each one of
them. This can be done by using for loop are while in C or C++. As
far as other languages are concerned you need to find a suitable
syntax for applying the above technique. Next we need to think
about adding them. Now to add them we require simple math,
sum=sum+i, called Summation technique, where initially sum=0 (as
it may contain garbage value which may add up giving incorrect
result)
Now each time you have to change the value of i in such a way that
you get the values starting from 1 and incrementing up to 10.

Cracking the code:


In C and C++:

Get more programming techniques and


improve your basics…Books don’t teach
this…only on www.TechnoCode.co.in
More to offer:
My friends used to tell me that, even after knowing C/C++ and Java they are unable to code.
Leaning syntax of a language is simple and easy enough but programming requires techniques.
There are some general techniques through which one will be able to think and code easily in
any language. The basic knowledge required to be a good programmer is to develop the skill of
logically applying the various techniques to a given problem, if one is able to develop this skill
then he would be able to break any code is any language.
Code 1 Technique to add first ten natural numbers.
Code 2 Technique to add first ten odd numbers.
Code 3 Technique to input a string and print only vowels.
Code 4 Technique to count the number of digits in a number.
Code 5 Technique to find sum of all digits in a number.
Code 6 Technique to reverse a number.
Code 7 Technique to form a new number using only odd digits of a number.
Code 8 Technique to generate fibonacci series.
Code 9 Technique to check for a palindrome number.

Visit Today www.TechnoCode.co.in


Also read interesting Blogs..Learn Share
and Explore…
Steganography Overview
By: Ankit Goyal Jan 21, 11
Steganography is the art of covered, or hidden, writing. The purpose of
steganography is covert communication to hide a message from a third party.
This differs from cryptography, the art of secret writing, which is intended to
make a message unreadable by a third party but does not hide the very
existence of the secret communication. Although the term steganography
was only coined at the very end of the fifteenth century, the use of stego
dates back several millennia.
Quine: Program that prints itself
By: Ankit Goyal Jan 21, 11

A quine is a program which prints its own code. This means that when the
program is run, it must print out precisely those instructions which the
programmer wrote as part of the program.

Protect your files


By: Ankit Goyal Jan 21, 11

Do you keep secrets?? Well most of us do and for that require a software
that would protect the files, folders and drive. Most software’s encrypt the
file for protecting it which creates problem as it requires a lot of time to
encryption and decryption.

Extend your laptop display to a monitor


By: Ankit Goyal Jan 21, 11
If you use your laptop as your main computer and if you have a spare
monitor, then you can put your monitor to good use by making it your
Laptop’s secondary monitor. It doesn’t really matter if the second monitor is
a CRT or TFT, both work fine. First, let’s see why you would want to add a
secondary monitor to your laptop.
Brainfuck Programming language
By: Ankit Goyal Jan 21, 11
The brainfuck programming language is an esoteric programming language
noted for its extreme minimalism. It is a Turing tarpit, designed to challenge
and amuse programmers, and is not suitable for practical use. Its name has
been variously bowdlerized, sometimes appearing as brainf***, brainf*ck,
brainfsck, b****fuck or BF.

You might also like