#include <iostream>using namespace std; int main() { long x = 3487; do{ cout << endl<< " Enter a number ( positive or negative ) : "; cin >> x; cout << " Binary representation : "<< endl; int nbits = 8*sizeof(x); // number of bits in variable x int z = nbits-1; int w =0; for( z ; z >= 0 ;--z) { //[variable]<<[number of places] long y =( x & ( 1 << z )); // move the 1 to the chosen place the others are 0 if( y!=0 ) cout<<"1",++w; else if (w!=0) {cout<<"0",++w;} if (w!=0 && w%4==0) cout << " "; } cout << endl; }while(x); return 0; }

Doubly linked list (4 files)

C++ again, for finding one root of a third degree equation and checking the result , it often works fine :

For finding the 93 first Fibonacci numbers very fast , after 93 iterations it is false :

A linked list for practising :

For finding the binary representation of a number using bits :

For finding the binary representation of a number using maths :

hexadecimal representation of a number using maths :

hexadecimal representation of a number using bits :

for well understanding the structure of a linked list, here is a simple one:

It was a long and difficult linked list, but apparently, it works. Below are some other pages of code in C++, exercises most of the time. I have also put some of my plugins for 3dsmax.

I learned maxscript before learning C++, here are some scripts or plugins I did:

Next, there is some linear algebra and funny matrices:

This is now a script for enciphering and deciphering messages.

Here is an example of enciphered message. If I tell you that the 2 primes are 431 and 743 , with my script above you surely can translate the following message: 62520 172480 147764 226702 42110 58127 123996 256203 196716 181614 299597 181614 241357 187604 32762 17311 309478 29630 301116 153664 113777 14703