“Great ability develops and reveals itself increasingly with every new assignment.”
It's all about Computer Science.
“Great ability develops and reveals itself increasingly with every new assignment.”
<title><data:blog.pageTitle/></title>
<b:if cond=’data:blog.pageType == "item"’>
<title><data:blog.pageName/> | <data:blog.title/></title>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
<h3><data:title/></h3>
<h2><data:title/></h2>

<b:if cond=’data:blog.metaDescription != ""’>
<meta expr:content=’data:blog.metaDescription’ name=’description’/>
</b:if>
User-agent: Mediapartners-Google
Disallow:
User-agent: *
Disallow: /search/
Disallow: /search?
Disallow: /search?q=*
Disallow: /*?updated-max=*
Disallow: /p/about.html
Disallow: /p/privacy.html
Allow: /
Sitemap: http://www.9to5blogger.com/atom.xml?redirect=false&start-index=1&max-results=500
<a expr:href=’data:label.url’ rel=’tag’>Either add the nofollow tag to the end of the above syntax or simply replace it with the below one.
<a expr:href=’data:label.url’ rel=’tag,nofollow’>Save your template.

- utm_source > No > Let Googlebot decide
- utm_medium > No > Let Googlebot decide
- utm_campaign > No > Let Googlebot decide
- updated-max > Yes > Sorts > Let Googlebot decide
- showComment > No > Let Google bot decide
- max-results > Yes > Sorts > Let Google bot decide
- m > Yes > Paginates > Let Google bot decide
- commentPage > Yes > Paginates > Every URL

#include<iostream>
using namespace std;
int main()
{
// Variable Declaration
int counter, num, fact = 1;
// Get Input
cout<<"Enter the Number to find its Factorial: ";
cin>>num;
//'for' Loop
for (int counter = num; counter >= 1; counter--)
{
fact = fact * counter;
}
cout<<endl;
cout<<"Factorial of "<<num<<" is: "<<fact<<endl;
return 0;
}
On December 10, 1815 (the same year that George Boole was born), a daughter Augusta Ada ByronÑ was born to Anna Isabella (Annabella) Byron and George Gordon, Lord Byron. At that time in England Byron’s fame derived not only from his poetry but also from his wild and scandalous behavior. The marriage was strained from the beginning, and Annabella left Byron
shortly after Ada’s birth. By April of 1816, the two had signed separation papers. Byron left England, never to return. Throughout the rest of his life he regretted that he was unable to see his daughter. At one point he wrote of her,
I see thee not. I hear thee not.
But none can be so wrapt in thee.
Before he died in Greece, at age 36, he exclaimed,
Oh my poor dear child! My dear Ada!
My God, could I but have seen her!
Meanwhile, Annabella, who eventually was to become a baroness in her own right, and who was educated as both a mathematician and a poet, carried on with Ada’s upbringing and education. Annabella gave Ada her first instruction in mathematics, but it soon became clear that Ada was gifted in the subject and should receive more extensive tutoring. Ada received further training from Augustus DeMorgan, today famous for one of the basic theorems of Boolean algebra. By age eight, Ada had demonstrated an interest in mechanical devices and was building detailed model boats.
When she was 18, Ada visited the Mechanics Institute to hear Dr. Dionysius Lardner’s lectures on the “Difference Engine”, a mechanical calculating machine being built by Charles Babbage. She became so interested in the device that she arranged to be introduced to Babbage. It was said that, upon seeing Babbage’s machine, Ada was the only person in the room to understand immediately how it worked and to recognize its significance. Ada and Charles Babbage became lifelong friends. She worked with him, helping to document his designs, translating writings
about his work, and developing programs for his machines. In fact, Ada today is recognized as the first computer programmer in history.
When Babbage designed his Analytical Engine, Ada foresaw that it could go beyond arithmetic computations and become a general manipulator of symbols, and thus would have far-reaching capabilities. She even suggested that such a device eventually could be programmed with rules of harmony and composition so that it could be produce “scientific” music. In effect, Ada foresaw the field of artificial intelligence more than 150 years ago.
In 1842, Babbage gave a series of lectures in Turin, Italy, on his Analytical Engine. One of the attendees was Luigi Menabrea, who was so impressed that he wrote an account of Babbage’s lectures. At age 27, Ada decided to translate the account into English, with the intent to add a few of her own notes about the machine. In the end, her notes were twice as long as the original material, and the document, “The Sketch of the Analytical Engine,” became the definitive work on the subject.
It is obvious from Ada’s letters that her “notes” were entirely her own and that Babbage was acting as a sometimes unappreciated editor. At one point, Ada wrote to him,
I am much annoyed at your having altered my Note. You know I am always
willing to make any required alterations myself, but that I cannot endure
another person to meddle with my sentences.
Ada gained the title Countess of Lovelace when she married Lord William Lovelace. The couple had three children, whose upbringing was left to Ada’s mother while Ada pursued her work in mathematics. Her husband was supportive of her work, but for a woman of that day such behavior was considered almost as scandalous as some of her father’s exploits.
Ada died in 1852, just one year before a working Difference Engine was built in Sweden from one of Babbage’s designs. Like her father, Ada lived only to age 36, and even though they led very different lives, she undoubtedly admired him and took inspiration from his unconventional and rebellious nature. In the end, Ada asked to be buried beside him at the family’s estate.
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
| 0 | nul | soh | stx | etx | eot | enq | ack | bel | bs | ht |
| 1 | nl | vt | ff | cr | so | si | dle | dc1 | dc2 | dc3 |
| 2 | dc4 | nak | syn | etb | can | em | sub | esc | fs | gs |
| 3 | rs | us | sp | ! | ” | # | $ | % | & | ‘ |
| 4 | ( | ) | * | + | , | - | . | / | 0 | 1 |
| 5 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; |
| 6 | < | = | > | ? | @ | A | B | C | D | E |
| 7 | F | G | H | I | J | K | L | M | N | O |
| 8 | P | Q | R | S | T | U | V | W | X | Y |
| 9 | Z | [ | \ | ] | ^ | _ | ’ | a | b | c |
| 10 | d | e | f | g | h | i | j | k | l | m |
| 11 | n | o | p | q | r | s | t | u | v | w |
| 12 | x | y | z | { | | | } | ~ | del |
| Operator | Type | Associativity |
| : : | binary scope resolution | left to right |
| : : | unary scope resolution | left to right |
| ( ) | parentheses | left to right |
| [ ] | array subscript | left to right |
| . | member selection via object | left to right |
| -> | member selection via pointer | left to right |
| + + | unary postfix increment | left to right |
| - - | unary postfix decrement | left to right |
| typeid | runtime type information | left to right |
| dynamic_cast <type> | runtime type-checked cast | left to right |
| static_cast <type> | compile-time type-checked cast | left to right |
| reinterpret_cast <type> | cast for nonstandard conversions | left to right |
| const_cast <type> | cast away const-ness | left to right |
| + + | unary prefix increment | right to left |
| - - | unary prefix decrement | right to left |
| + | unary plus | right to left |
| - | unary minus | right to left |
| ! | unary logical negation | right to left |
| ~ | unary bitwise complement | right to left |
| sizeof | determine size in bytes | right to left |
| & | address | right to left |
| * | dereference | right to left |
| new | dynamic memory allocation | right to left |
| new[ ] | dynamic array allocation | right to left |
| delete | dynamic memory deallocation | right to left |
| delete[ ] | dynamic array deallocation | right to left |
| ( type ) | C-style unary cast | right to left |
| .* | pointer to member via object | left to right |
| ->* | pointer to member via pointer | left to right |
| * | multiplication | left to right |
| / | division | left to right |
| % | modulus | left to right |
| + | addition | left to right |
| - | subtraction | left to right |
| << | bitwise left shift | left to right |
| >> | bitwise right shift | left to right |
| < | relational less than | left to right |
| <= | relational less than or equal to | left to right |
| > | relational greater than | left to right |
| >= | relational greater than or equal to | left to right |
| = = | relational is equal to | left to right |
| != | relational is not equal to | left to right |
| & | bitwise AND | left to right |
| ^ | bitwise exclusive OR | left to right |
| | | bitwise inclusive OR | left to right |
| && | logical AND | left to right |
| | | | logical OR | left to right |
| ?: | ternary conditional | right to left |
| = | assignment | right to left |
| += | addition assignment | right to left |
| - = | subtraction assignment | right to left |
| * = | multiplication assignment | right to left |
| /= | division assignment | right to left |
| %= | modulus assignment | right to left |
| &= | bitwise AND assignment | right to left |
| ^= | bitwise exclusive OR assignment | right to left |
| |= | bitwise inclusive OR assignment | right to left |
| <<= | bitwise left-shift assignment | right to left |
| >>= | bitwise right-shift assignment | right to left |
| , | comma | left to right |
Standard Library Container Class
|
Description
|
| Sequence containers | |
| vector |
Rapid insertions and deletions at back. Direct access to any element.
|
| deque |
Rapid insertions and deletions at front or back. Direct access to any element.
|
| list |
Doubly linked list, rapid insertion and deletion anywhere.
|
| Associative containers | |
| set |
Rapid lookup, no duplicates allowed.
|
| multiset |
Rapid lookup, duplicates allowed.
|
| map |
One-to-one mapping, no duplicates allowed, rapid key-based lookup.
|
| multimap |
One-to-one mapping, duplicates allowed, rapid key-based lookup.
|
| Container adapters | |
| stack |
Last-in, first-out (LIFO).
|
| queue |
First-in, first-out (FIFO).
|
| priority_queue |
Highest-priority element is always the first element out.
|
| Member Function | Description |
| default constructor | A constructor to create an empty container. Normally, each container has several constructors that provide different initialization methods for the container. |
| copy constructor | A constructor that initializes the container to be a copy of an existing container of the same type. |
| destructor | Destructor function for cleanup after a container is no longer needed. |
| empty | Returns true if there are no elements in the container, otherwise, returns false. |
| insert | Inserts an item in the container. |
| size | Returns the number of elements currently in the container. |
| operator= | Assigns one container to another. |
| operator< | Returns true if the first container is less than the second one, otherwise, returns false. |
| operator<= | Returns true if the first container is less than or equal to the second one, otherwise, returns false. |
| operator> | Returns true if the first container is greater than the second one, otherwise, returns false. |
| operator>= | Returns true if the first container is greater than or equal to the second one, otherwise, returns false. |
| operator== | Returns true if the first container is equal to the second one, otherwise, returns false. |
| operator!= | Returns true if the first container is not equal to the second one, otherwise, returns false. |
| swap | Swap the elements of the two containers. |
| max_size | Returns the maximum number of elements for a container. |
| begin | The two versions of this function return either an iterator or a const_iterator that refers to the first element of the container. |
| end | The two versions of this function return either an iterator or a const_iterator that refers to the next position after the end of the container. |
| rbegin | The two versions of this function return either a reverse_iterator or a const_reverse_iterator that refers to the last element of the container. |
| rend | The two versions of this function return either a reverse_iterator or a const_reverse_iterator that refers to the next position after the last element of the reversed container. |
| erase | Erases one or more elements from the container. |
| clear | Erases all the elements from the container. |
| Header File | Description |
| <vector> | |
| <list> | |
| <deque> | |
| <queue> | Contains both queue and priority_queue. |
| <stack> | |
| <map> | Contains both map and multimap. |
| <set> | Contains both set and multiset. |
| <valarray> | |
| <bitset> |
| typedef | Description |
| allocator_type | The type of the object used to allocate the container’s memory. |
| value_type | The type of the element stored in the container. |
| reference | A reference to the type of element stored in the container. |
| const_reference | A constant reference to the type of element stored in the container. Such a reference can be used only for reading elements in the container and for performing const operations. |
| pointer | A pointer to the type of element stored in the container. |
| const_pointer | A pointer to a constant of the container’s element type. |
| iterator | An iterator that points to an element of the container’s element type. |
| const_iterator | A constant iterator that points to the type of element stored in the container and can be used only to read elements. |
| reverse_iterator | A reverse iterator that points to the type of element stored in the container. This type of iterator is for iterating through a container in reverse. |
| const_reverse_iterator | A constant reverse iterator that points to the type of element stored in the container and can be used only to read elements. This type of iterator is for iterating through a container in reverse. |
| difference_type | The type of the result of subtracting two iterators that refer to the same container (operator - is not defined for iterators of lists and associative containers). |
| size_type | The type used to count items in a container and index through a sequence container (cannot index through a list). |
| Iterator Category | Description |
| input | Used to read an element from a container. An input iterator can move only in the forward direction (i.e., from the beginning of the container to the end) one element at a time. Input iterators support only one-pass algorithms - the same input iterator cannot be used to pass through a sequence twice. |
| output | Used to write an element to a container. An output iterator can move only in the forward direction one element at a time. Output iterators support only one-pass algorithms - the same output iterator cannot be used to pass through a sequence twice. |
| forward | Combines the capabilities of input and output iterators and retains their position in the container (as state information). |
| bidirectional | Combines the capabilities of a forward iterator with the ability to move in the backward direction (i.e., from the end of the container towards the beginning). Bidirectional iterators support multipass algorithms. |
| random access | Combines the capabilities of a bidirectional iterator with the ability to directly access any element of the container (i.e., to jump forward or backward by an arbitrary number of elements). |
| Container | Type of Iterator Supported |
| Sequence containers (first class) | |
| vector |
random access
|
| deque |
random access
|
| list | bidirectional |
| Associative containers (first class) | |
| set | bidirectional |
| multiset | bidirectional |
| map | bidirectional |
| multimap | bidirectional |
| Container adapters | |
| stack | no iterators supported |
| queue | no iterators supported |
| priority_queue | no iterators supported |
| Predefined typedefs for iterator types | Direction of ++ | Capability |
| iterator |
forward
|
read / write
|
| const_iterator |
forward
|
read
|
| reverse_iterator |
backward
|
read / write
|
| const_reverse_iterator |
backward
|
read
|
| Iterator Operation | Description |
| All iterators | |
| ++p | Pre-increment an iterator. |
| p++ | Post-increment an iterator. |
| Input iterators | |
| *p | Dereference an iterator. |
| p = p1 | Assign one iterator to another. |
| p == p1 | Compare iterators for equality. |
| p != p1 | Compare iterators for inequality. |
| Output iterators | |
| *p | Dereference an iterator. |
| p = p1 | Assign one iterator to another. |
| Forward iterators | Forward iterators provide all the functionality of both input iterators and output iterators. |
| Bidirectional iterators | |
| --p | Pre-decrement an iterator. |
| p-- | Post-decrement an iterator. |
| Random access iterators | |
| p += i | Increment the iterator p by i positions. |
| p -= i | Decrement the iterator p by i positions. |
| p + i or i + p | Expression value is an iterator positioned at p incremented by i positions. |
| p - i | Expression value is an iterator positioned at p decremented by i positions. |
| p - p1 | Expression value is an integer representing the distance between two elements in the same container. |
| p[ i ] | Return a reference to the element offset from p by i positions. |
| p < p1 | Return true if iterator p is less than iterator p1 (i.e., iterator p is after iterator p1 in the container); otherwise, return false. |
| p <= p1 | Return true if iterator p is less than or equal to iterator p1 (i.e., iterator p is before iterator p1 or at the same location as iterator p1 in the container); otherwise, return false. |
| p > p1 | Return true if iterator p is greater than iterator p1 (i.e., iterator p is after iterator p1 in the container); otherwise, return false. |
| p >= p1 | Return true if iterator p is greater than or equal to iterator p1 (i.e., iterator p is after iterator p1 or at the same location as iterator p1 in the container); otherwise, return false. |
| copy | partition | replace_copy | stable_partition |
| copy_backward | random_shuffle | replace_copy_if | swap |
| fill | remove | replace_if | swap_ranges |
| fill_n | remove_copy | reverse | transform |
| generate | remove_copy_if | reverse_copy | unique |
| generate_n | remove_if | rotate | unique_copy |
| iter_swap | replace | rotate_copy |
| adjacent_find | equal | find_end | mismatch |
| count | find | find_first_of | search |
| count_if | find_each | find_if | search_n |
| accumulate | partial_sum |
| inner_product | adjacent_difference |
| STL Exception Types | Description |
| out_of_range |
Indicates when subscript is out of range - e.g., when an invalid subscript is specified to vector member function at.
|
| invalid_argument |
Indicates an invalid argument was passed to a function.
|
| length_error |
Indicates an attempt to create too long a container, string, etc..
|
| bad_alloc |
Indicates that an attempt to allocate memory with new (or with an allocator) failed because not enough memory was available.
|
| Algorithm | Description |
| inner_product | Calculate the sum of the products of two sequences by taking corresponding elements in each sequence, multiplying those elements and adding the result to a total. |
| adjacent_difference | Beginning with the second element in a sequence, calculate the difference (using operator -) between the current and previous elements and store the result. The first two input iterators arguments indicate the range of elements in the container and the third indicates where the results should be stored. A second version of this algorithm takes as a fourth argument a binary function to perform a calculation between the current element and the previous element. |
| partial_sum | Calculate a running total (using operator -) of the values in a sequence. The first two input iterators arguments indicate the range of elements in the container and the third indicates where the results should be stored. A second version of this algorithm takes as a fourth argument a binary function that performs a calculation between the current value in the sequence and the running total. |
| nth_element | Use three random-access iterators to partition a range of elements. The first and last arguments represent the range of elements. The second argument is the partitioning element’s location. After this algorithm executes, all elements before the partitioning element are less than that element and all elements after the partitioning element are greater than or equal to that element. A second version of this algorithm takes as a fourth argument a binary comparison function. |
| partition | This algorithm is similar to nth_element, but requires less powerful bidirectional iterators, making it more flexible. It requires two bidirectional iterators indicating the range of elements to partition. The third argument is a unary predicate function that helps partition the elements so that all elements for which the predicate is true are to the left (toward the beginning of the sequence) of those for which the predicate is false. A bidirectional iterator is returned indicating the first element in the sequence for which the predicate returns false. |
| stable_partition | Similar to partition except that this algorithm guarantees that equivalent elements will be maintained in their original order. |
| next_permutation | Next lexicographical permutation of a sequence. |
| prev_permutation | Previous lexicographical permutation of a sequence. |
| rotate | Use three forward iterator arguments to rotate the sequence indicated by the first and last argument by the number of positions indicated by subtracting the first argument from the second argument. e.g., the sequence 1,2,3,4,5 rotated by two positions would be 4,5,1,2,3. |
| rotate_copy | This algorithm is identical to rotate except that the results are stored in a separate sequence indicated by the fourth argument - an output iterator. The two sequences must have the same number of elements. |
| adjacent_find | This algorithm returns an input iterator indicating the first of two identical adjacent elements in a sequence. If there are no identical adjacent elements, the iterator is positioned at the end of the sequence. |
| search | This algorithm searches for a subsequence of elements within a sequence of elements and, if such a subsequence is found, returns a forward iterator that indicates the first element of that subsequence. If there are no matches, the iterator is positioned at the end of the sequence to be searched. |
| search_n | This algorithm searches a sequence of elements looking for a subsequence in which the values of a specified number of elements have a particular value and, if such a subsequence is found, returns a forward iterator that indicates the first element of that subsequence. If there are no matches, the iterator is positioned at the end of the sequence to be searched. |
| partial_sort | Use three random-access iterators to sort part of a sequence. The first and last arguments indicate the sequence of elements. The second argument indicates the ending location for the sorted part of the sequence. By default, elements are ordered using operator < (a binary predicate function can also be supplied). The elements from the second argument iterator to the end of the sequence are in an undefined order. |
| partial_sort_copy | Use two input iterators and two random-access iterators to sort part of a sequence indicated by the two input iterator arguments. The results are stored in the sequence indicated by the two random-access iterator arguments. By default, elements are ordered using operator < (a binary predicate function can also be supplied). The number of elements sorted is the smallest of the number of elements in the result and the number of elements in the original sequence. |
| stable_sort | The algorithm is similar to sort except that all equivalent elements are maintained in their original order. This sort is O(n log n) if enough memory is available; otherwise, it’s O(n(log n)2). |
| STL Function Objects | Type | STL Function Objects | Type |
| divides< T > | arithmetic | logical_or< T > | logical |
| equal_to< T > | relational | minus< T > | arithmetic |
| greater< T > | relational | modulus< T > | arithmetic |
| greater_equal< T > | relational | negate< T > | arithmetic |
| less< T > | relational | not_equal_to< T > | relational |
| less_equal< T > | relational | plus< T > | arithmetic |
| logical_and< T > | logical | multiplies< T > | arithmetic |
| logical_not< T > | logical |

