Dynamic Profile Codes
Would you like to react to this message? Create an account in a few clicks or log in to continue.

POST YOUR C++ PROGRAMS iR ! SiMPLE ->

+2
L'Jyen [♥]
deathrowcore
6 posters

Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by deathrowcore Mon Nov 09, 2009 4:24 pm

POST IR
anything that can help our young IT's to improve their skills.
for example...
fibonacci sequence
sorting algorithm


here's an example

bubble sort code


#include <iostream>

using namespace std;


int compare(int, int);

void sort(int[], const int);

void swap(int *, int *);


int compare(int x, int y)

{

return(x > y);

}


void swap(int *x, int *y)

{

int temp;

temp = *x;

*x = *y;

*y = temp;

}


void sort(int table[], const int n)

{

for(int i = 0; i < n; i++)

{

for(int j = 0; j < n-1; j++)

{

if(compare(table[j], table[j+1]))

swap(&table[j], &table[j+1]);

}

}

}


int quantity;

int* tab;


int main()

{

cout << "Input quantity: ";

cin >> quantity;

tab = new int [quantity];

cout << "Input numbers: \n\n";

for (int i = 0; i < quantity; i++)

{

int x = i;

cout << "#" << ++x << ": ";

cin >> tab[i];

}


cout << "\nBefore sorting: ";

for (int i = 0; i < quantity; i++)

{

cout << tab[i] << " ";

}


cout << "\nAfter sorting: ";

sort(tab, quantity);

for(int i = 0; i < quantity; i++)

{

cout << tab[i] << " ";

}

return 0;

}


Last edited by deathrowcore on Sat Nov 14, 2009 9:24 am; edited 1 time in total
deathrowcore
deathrowcore
Newbie

Male
Posts : 17
Age : 31
Joined date : 2009-10-29
Location : pampanga
Cash : 26559

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by L'Jyen [♥] Tue Nov 10, 2009 2:43 pm

the programmed program??

like a program of a survey?
is it like that?

specify please..
L'Jyen [♥]
L'Jyen [♥]
DPC Elite

Female
Posts : 4910
Age : 30
Joined date : 2009-10-26
Location : in lala-land x]]
Cash : 31819

http://kawaii610.webs.com

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by lovebang01 Tue Nov 10, 2009 8:57 pm

aray
lovebang01
lovebang01
DPC Addict

Male
Posts : 166
Age : 31
Joined date : 2009-10-26
Location : Bacolod City
Cash : 26763

http://friendster.com/admerbakud

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by XED Tue Nov 10, 2009 9:01 pm

^ oops.. spam yan! POST YOUR C++ PROGRAMS iR ! SiMPLE -> 885946

kindly specify ur subject pls.
we don't understand ee..
XED
XED
Global Moderator
 Global Moderator

Male
Posts : 6137
Age : 113
Joined date : 2009-10-22
Location : sa bag mo :]]
Cash : 31132

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by L'Jyen [♥] Wed Nov 11, 2009 9:16 am

if yer looking for Compilers/IDE's of C/C++ click here
or
all tools for progrmming in different languages
click here

kindly specify it for us
to understand it well..
thanks^^
L'Jyen [♥]
L'Jyen [♥]
DPC Elite

Female
Posts : 4910
Age : 30
Joined date : 2009-10-26
Location : in lala-land x]]
Cash : 31819

http://kawaii610.webs.com

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by jhennyz Sat Mar 06, 2010 7:11 pm

*

this is an example code for a C++ program...
___

thanks for sharin this..

for a better reading purposes...

u can ease the space by using

[c0de][/c0de]..

it can maximize tha space ur using..

i know codes are long..^^
jhennyz
jhennyz
DPC Addict

Female
Posts : 148
Age : 31
Joined date : 2010-03-04
Location : ~NOWHERETOFiND~
Cash : 26566

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by Null Mon Mar 08, 2010 8:53 am

check the title please...only post c++ codes.. Thank you
Null
Null
DPC Guest
DPC Guest

Male
Posts : 625
Age : 33
Joined date : 2009-10-29
Location : Regina Parquez's Heart
Cash : 26754

Back to top Go down

POST YOUR C++ PROGRAMS iR ! SiMPLE -> Empty Re: POST YOUR C++ PROGRAMS iR ! SiMPLE ->

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum