WWW - Technocode.Co - In: Get More Programming Techniques and Improve Your Basics Books Don'T Teach This Only On
WWW - Technocode.Co - In: Get More Programming Techniques and Improve Your Basics Books Don'T Teach This Only On
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.
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.
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.