This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello world!"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
https://projecteuler.net/problem=36 | |
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. | |
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. | |
(Please note that the palindromic number, in either base, may not include leading zeros.) | |
""" | |
count = 0 | |
for i in range(1000000): | |
integer = str(i) | |
integer_reverse = integer[::-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* PHONEBOOK 2011-TC Version(2.5) | |
By: MORTEZA ZAKERI (m-zakeri@live.com) | |
[2010-2011 ARAK UNIVERCITY-Computer Group] | |
www.micropedia.ir | |
Note: Run this program with Turbo C++3.0 - 3.5 | |
*/ | |
//1-header files... | |
#include <conio.h> | |
#include <stdio.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
hanoi_tower in c | |
author: Abbas Aryanpoor | |
date: 2012 | |
www.micropedia.ir | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <conio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* heap_sort.cpp (with array) | |
* Defines the entry point for the console application. | |
*/ | |
#include "stdafx.h" | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAXSOLUTIONS 5 | |
//--------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package btree; | |
/** | |
* *********************************************************************** | |
* Compilation: javac BTree.java Execution: java BTree | |
* | |
* B-tree. | |
* | |
* Limitations ----------- - Assumes M is even and M >= 4 - should b be an array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <conio.h> | |
/* | |
compressed_sparse_matrix in cpp | |
author: Morteza Zakeri | |
date: 2012-10-23 | |
*/ | |
using namespace std; |