Calendar
« July 2011 » | Su | Mo | Tu | We | Th | Fr | Sa | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Statistics
Total online: 1 Guests: 1 Users: 0
|
Main » 2011 » July » 01
#include <iostream> using namespace std;
int mul(int x, int y){
return (x*y); }
int main() { int i, j; int a[10][10]; for (i=0;i<10;i++){ for (j=0;j<10;j++) a[i][j]=mul(i,j); }
for (i=0;i<10;i++){ cout<<endl; for (j=0;j<10;j++) cout<<i<<" * "<<j<<" = "<<a[i][j]<<endl; } return 0; }
|
#include <cstdlib> #include <iostream> //Gnome Sort Algorithm using namespace std; //gnomeSort Function void gnomeSort(int elements, int arr[]) { int i = 0, temp; while( i < elements ){ if ( i == 0 || arr [i - 1] <= arr[i] ) i++; else{ temp = arr[i]; arr[i] = arr[i - 1]; arr[--i] = temp; }//end else }//en
...
Read more »
| |
|