• Home
  • About
Subscribe: Posts | Comments | E-mail
  • C++ Programming
  • Goodies
  • Xbox 360

Goodies4uAll

Archive for the ‘C++ Programming’ Category


Posted on March 7, 2010 - by Don

Extended Euclidean Algorithm in C++

Writing an Extended Euclidean Calculator that calculates the inverse of a modulus can get pretty difficult. However writing a good algorithm and going through step by step can make the process so much easier.  So we want to find a’ or inverse of a so that a * a’ [=] 1 (mod b). In other words we are trying to find an integer (a’) when multiplied by     a    and then divided by   b   gives you a remainder of   1. In order to find this number(a’), we have to work the Euclidean Algorithm backwards which is referred to as the Extended Euclidean Algorithm.

(more…)


Posted on March 6, 2010 - by Don

Modular Exponentiation in C++

Modular Exponentiation is way of calculating the remainder when dividing an integer b (Base) by another integer m (Modulus) raised to the power e(Exponent). Fast modular exponentiation of large numbers is used all the time in RSA to encrypt/decrypt private information over the internet. Whenever you go to a secure site you are using RSA which deals with modular exponentiation.So lets understand modular exponentiation with c++!

(more…)


Posted on March 6, 2010 - by Don

Fibonacci Calculator C++

Fibonacci Calculator C++

The fibonacci sequence is as follows :

0,\;1,\;1,\;2,\;3,\;5,\;8,\;13,\;21,\;34,\;55,\;89,\;144,\;  \ldots.

Each successive number is equal to the sum of the two preceding numbers. If you wanted to find the 5th number of the sequence it would be 5.

F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
0 1 1 2 3 5 8 13 21 34 55 89 144

This program is implemented with a double linked list. Each Fibonacci number stored as a sequence of integers inside of a list. For example to calculate the 6th number of the Fibonacci sequence it would start out with f1 and f2 lists that have a single node with 1 inside.

(more…)


Posted on July 10, 2009 - by Don

How do I search for a filename in c++

Are you writing a program and need to know how to search for a specific file name? After searching around at msdn.microsoft.com and some trial and error I can show you how.  I will be using FindFirstFile and FindNextFile to do my search. (more…)


Posted on June 14, 2009 - by Don

Sudoku Program in C++

Sudoku Program in C++

Sudoku is one of my favorite games and I really enjoyed writing a sudoku solver. This sudoku procedural program was written in the language c++. The sudoku program allows you to input a board via a text file and allows you to save your progress. If you  get stuck, the program can finish the board. I also spent the time to implement a colored board into the  program. If you don’t understand the rules of sudoku or how to play sudoku then you can go here.

Sudoku Program Output

(more…)


Ad

  • Ad Ad Ad Ad
  • Help support Goodies4uall

© 2009 Goodies4uAll. Created by Don Page.

Goodies4uAll - Goodies and more goodies