Sunday, 09.08.2020, 20:49
Welcome Guest | RSS
Site menu
Login form
Section categories
Search
Calendar
«  August 2020  »
SuMoTuWeThFrSa
      1
2345678
9101112131415
16171819202122
23242526272829
3031
Entries archive
Our poll
Rate my site
Total of answers: 6
Statistics

Total online: 1
Guests: 1
Users: 0

Programming

[ Add ]
Category: Html/Javascript | Views: 1537 | Added by: H_Imirzyan | Date: 30.06.2012 | Comments (0)

This is a simple calculator using one text box and numbers. It uses the eval() function to work.

Here is the screenshot:
Category: Html/Javascript | Views: 428 | Added by: H_Imirzyan | Date: 19.06.2012 | Comments (0)

This program counts time difference in minutes or hours between two different times. But unfortunately this javascript source code does not work in Google Chrome.

Here is a screenshot:

Category: Html/Javascript | Views: 512 | Added by: H_Imirzyan | Date: 19.06.2012 | Comments (0)

#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;
            }

Category: C++ programs | Views: 3601 | Added by: H_Imirzyan | Date: 01.07.2011 | Comments (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 »
Category: C++ programs | Views: 570 | Added by: H_Imirzyan | Date: 01.07.2011 | Comments (0)

#include <iostream>

using namespace std;

int stugum(char c) {

   c&=(1<<5);
   if(c==0)
   return 0;
   else
   return 1;
 }

int main(){
char a;
cin>>a;
cout<<stugum(a);
return 0;

}
Category: C++ programs | Views: 440 | Added by: H_Imirzyan | Date: 21.06.2011 | Comments (0)

#include <iostream>

using namespace std;

int main()
{
   char a;
   cin>>a;
   int b=a&(1<<5);
   if(b==0)
   cout<<"upper case";
   else
   cout<<"lower case";cin.get();
   return 0;
}

Category: C++ programs | Views: 449 | Added by: H_Imirzyan | Date: 21.06.2011 | Comments (0)

#include <iostream>

using namespace std;

class Int{
int i;
public:
Int(int a){i=a;}
friend int operator + (Int&, Int&);
friend int operator * (Int&, Int&);
friend int operator % (Int&, Int&);
};
int operator + (Int& a, Int& b){return a.i*b.i-a.i;};
int operator * (Int& a, Int& b){return a.i-b.i;};
int operator % (Int& a, Int& b){return (100*b.i)/a.i;};

int main()
{
    int x,y;
    cin>>x>>y;
    Int a(x),b(y);
    cout<<endl<<a*b+(a+b)<<endl<<a%b;
    return 0;
}

Category: C++ programs | Views: 425 | Added by: H_Imirzyan | Date: 16.06.2011 | Comments (0)

#include <iostream>

using namespace std;

int main()
{
    int i,j,n;
    cin>>n;
    for(int i=n;i>0;--i)
    {
        for(int j=i;j>0;j--)
        cout<<'*';
        cout<<endl;}

    return 0;
}

Category: C++ programs | Views: 5077 | Added by: H_Imirzyan | Date: 10.06.2011 | Comments (0)

#include <iostream>

using namespace std;

int main()
{
    for(int n=9, i=0; n>0, i<10; n--, i++){
    cout<<n<<", ";
    cout<<i<<", ";
    }
    cout<<"Fire!"<<endl;
    return 0;
}

Category: C++ programs | Views: 444 | Added by: H_Imirzyan | Date: 10.06.2011 | Comments (0)

1 2 3 »