Monday, October 31, 2011

Read and display an array (Program)

Write a program that read and display an array.

#include<stdio.h>
int main()
{
   int i,n,a[100];
   printf("How many numbers: ");
   scanf("%d",&n);
   for (i=0; i<n; i++)
   scanf("%d",&a[i]);
   for (i=0; i<n; i++)
   printf("%4d",a[i]);
return 0;
}

From: Me

Sunday, October 30, 2011

Find permutation .

Write a program for Find permutation.

# include<stdio.h>
int fact(int);
int main()
{
int n,r,P;
scanf("%d %d",&n,&r);
if(n>=r)
    {
    P=fact(n)/fact(n-r);
    printf("%dP%d=%d",n,r,P);
    return 0;
    }
}
int fact(int n)
    {
        int i,f=1;
    for(i=1;i<=n;i++)
    f=f*i;
        return (f);
    }

From: Me

Find factorial (Program)

Write a program for find factorial.

# include<stdio.h>
int main()
long fact(long);
{
int number;
scanf("%d",&number);
printf("Fact: %ld",fact(number));
return 0;
}
long fact(long number)
    {
    long factorial=1;
    for(i=number;i>=1;i--)
    factorial=factorial*i;
    return (factorial);
    }

From: Me

Convert integer to roman digit (Program)

Write a program for convert integer to roman digit.

# include<stdio.h>
int main()
{
int number;
scanf("%d",&number);
while(number>=1000)
    {
    printf("M");
    number-=1000;
    }
while(number>=500)
    {
    printf("D");
    number-=500;
    }
while(number>=100)
    {
    printf("C");
    number-=100;
    }
while(number>=50)
    {
    printf("L");
    number-=50;
    }
while(number>=10)
    {
    printf("X");
    number-=10;
    }
while(number>=5)
    {
    printf("M");
    number-=5;
    }
switch(number)
    {
    case 0:
        break;
    case 1: printf("I");
    break;
    case 2: printf("II");
    break;
    case 3: printf("III");
    break;
    case 4: printf("IV");
    break;
    }
return 0;
}


From: Me 

Find fibonacci number (Program)

Write a proaram for  Find fibonacci number.
# include<stdio.h>
int main()
{
int n,i,f0=0,f1=1,f;
scanf("%d",&n);
for(i=1;i<=n;i++)
    {
    f=f0+f1;
    printf("%4d",f0);
    f1=f0;
    f0=f;
    }
return 0;
}

From: Me 

Saturday, October 29, 2011

Reverse integer (Program)

Write a program for reversing integer number.
Sloution:
# include<stdio.h>
# include<conio.h>
int main()
{
    int number,rev,sum=0;
    scanf("%d",&number);
    while(number>0)
    {
                   rev=number%10;
                   number/=10;
                   sum=sum*10+rev;
                   }
    printf("%d",sum);
    getch();
    return 0;
}

From: Me 

Monday, October 24, 2011

SMS fun

Man lives base on sad and happy.
without this life is not life.
So,forget sad,go with happy.
                                       "Biplob"

Nishi jokhon vor hobe,
    sukh tara nive jabe,
Suru hobe notun din,
    Dukkho hotasa klanti vule,
dingogl hok omolin.
                                         ''Imran"
Hi FAJIL!
Please do not mind for this.
Fajil means...
    F-Faithful friend
    A-Always sweet
    J-Joyful
    I-Intelligent
    L-Loving
So, you are a great Fajil!
                                           "Imran"
Lovers love is sweetest.
Mothers loves is the best.
But friends love is heart rest.
  "happy friendship day"
                                              "Jeba"
Alpo alpo megh thakle,
Halka halka bristi hoy.
Choto choto galpo thakle,
valobasar sristy hoy.
Ar majhe majhe SMS dile,
Somporko ta misty hoy.
                                               "Jeba"

From: Me 

Sunday, October 23, 2011

Get a master card now

If you are a freelancer. You need a international acceptable card. As like a master card.
If you want to get a master card, You need to a odesk account. You can apply a master card from this site.

Applying process:
Coming soon...

From: Me 

Install Bangla fonts

If you have no bangla font in your PC, you can not see bangla language in any website. For see bangla language in your PC you need to install bangla fonts.

Installation process:
  • Downloads bangla fonts (You can use bijoy fonts).
  • Copy all the fonts.
  • Open control panel.
  • Open fonts folder.
  • Paste all copy fonts.
    Now you are showing installation process...
    And you are now able to see bangla fonts in any website.
From: Me

    Thursday, October 20, 2011

    C/C++ programming functions

    abs()
    Int
    Return absolute value
    stdlib.h
    acos()
    Double
    Return arc cosine
    math.h
    asin()
    Double
    Return arc sin
    math.h
    atan()
    Double
    Return arc tangent
    math.h
    atan2(d1,d2)
    Double
    Return arc tangent of d1/d2
    math.h
    atof()
    Double
    Convert string to double
    stdlib.h
    atoi()
    Int
    Convert string to integer
    stdlib.h
    atol()
    Long
    Convert string to long integer
    stdlib.h
    calloc(u1,u2)
    Void
    Return a pointer of the beginning allocate memory
    malloc.h
    stdlib.h
    ceil()
    Double
    Return round up value
    math.h
    cos()
    Double
    Return cosign
    math.h
    cosh()
    Double
    Return the hyperbolic cosine
    math.h
    difftime(l1,l2
    Double
    Return time difference l1-l2
    time.h
    exit()
    Void
    Close all file & buffer & terminate the program
    stdlib.h
    exp()
    Double
    Return the exponential value
    math.h
    fabs()
    Double
    Return the absolute value
    math.h
    fclose(f)
    Int
    Close file & return 0 if successful
    stdio.h
    feof()
    Int
    Determine if an end-of file condition has been reached. If so, return non zero else 0
    stdio.h
    fgetc(f)
    Int
    Enter a single character from file f
    stdio.h
    fgets(s,i,f)
    Char
    Enter string s, containing I characters, from file f
    stdio.h
    floor()
    Double
    Return round down value
    math.h
    fmod(d1,d2)
    Double
    Return remainder of d1%d2
    math.h
    fopen(s1,s2)
    File
    Open a file name s1 of type s2. Return a pointer to the file
    stdio.h
    fprintf(f,…)
    Int
    Send data item to file f, (remaining arguments are complicated)
    stdio.h
    fputc(c,f)
    Int
    Send a single character to file
    stdio.h
    fputs(s,f)
    Int
    Send a string to file
    stdio.h
    fread(s,i1,i2,f)
    Int
    Enter i2 data items, each of size i1 bytes, from file f to string s
    stdio.h
    free(p)
    Void
    Free a block of allocate memory whose beginning is indicated by p
    malloc.h
    stdio.h
    fscanf(f,…)
    Int
    Enter data item from the file f
    stdio.h
    fseek(f,l,i)
    Int
    Move the pointer for file f a distance l bytes from location i
    stdio.h

    ftell(f)

    Long

    Return the current pointer position within file f

    stdio.h
    fwrite(s,i1,i2,f)
    Int
    Enter i2 data items, each of size i1 bytes, from string s to file f
    stdio.h
    fetc(f)
    Int
    Enter a single character from file f
    stdio.h
    fetchar()
    Int
    Enter a single character from standard input device
    stdio.h
    gets()
    Char
    Enter a string  from keyboard
    stdio.h
    isalnum(c)
    Int
    Determine if argument is alphanumeric, return a non zero value if true else zero
    ctype.h
    isalpha(c)
    Int
    Determine if argument is alphabetic, return a non zero value if true else zero
    ctype.h
    isascii(c)
    Int
    Determine if argument is an ascii character, return a non zero value if true else zero
    ctype.h
    iscntrl(c)
    Int
    Determine if argument is ascii control character, return a non zero value if true else zero
    ctype.h
    isdigit(c)
    Int
    Determine if argument is a  decimal digit, return a non zero value if true else zero
    ctype.h
    isgraph(c)
    Int
    Determine if argument is a graphic ascii character, return a non zero value if true else zero
    ctype.h
    islower(c)
    Int
    Determine if argument is lowercase, return a non zero value if true else zero
    ctype.h
    issodigit(c)
    Int
    Determine if argument is an octal digit, return a non zero value if true else zero
    ctype.h
    isprint(c)
    Int
    Determine if argument is a printing ascii character, return a non zero value if true else zero
    ctype.h
    ispunct(c)
    Int
    Determine if argument is a punctuation character, return a non zero value if true else zero
    ctype.h
    isspace(c)
    Int
    Determine if argument is a white space character, return a non zero value if true else zero
    ctype.h
    isupper(c)

    Int

    Determine if argument is uppercase character, return a non zero value if true else zero

    ctype.h
    isxdigit(c)
    Int
    Determine if argument is a hexadecimal digit, return a non zero value if true else zero
    ctype.h
    labs(l)
    Long
    Return the absolute value
    math.h
    log(d)
    Double
    Return the natural logarithm
    math.h
    log10(d)
    Double
    Return the logarithm base 10 of d
    math.h
    malloc(u)
    Void
    Allocate u bytes of memory. Return a pointer to the beginning of the allocate space
    malloc.h
    stdlib.h
    pow(d1,d2)
    Double
    Return the d1 raise to the d2 power
    math.h
    printf(…)
    Int
    Send data item to the  standard output device
    stdio.h
    putc(c,f)
    Int
    Send  a single character to file f
    stdio.h
    putchar(c)
    Int
    Send a single character to the  standard output device
    stdio.h
    puts(s)
    Int
    Send a string  to the  standard output device
    stdio.h
    rand()
    Int
    Return a random positive integer
    stdlib.h
    rewind(f)
    Void
    Move the pointer to the beginning of the file f
    stdio.h
    scanf(…)
    Int
    Input data item to the  standard input device
    stdio.h
    sin(d)
    Double
    Return the sine of d
    math.h
    sinh(d)
    Double
    Return the hyperbolic sine of d
    math.h
    sqrt(d)
    Double
    Return the square root  of d
    math.h
    srand()
    Void
    Initialize the random number generator
    stdlib.h
    strstr(s1,s2)
    strcmp(s1,s2)

    Int


    Int

    Search string s2 from s1

    Compare two string lexicographically. Return a negative value if s1<s2, positive if s1>s2, zero if s1==s2

    string.h

    string.h
    strcmpi(s1,s2)
    Int
    Compare two string lexicographically without regard to case. Return a negative value if s1<s2, positive if s1>s2, zero if s1==s2
    string.h
    strcpy(s1,s2)
    Char
    Copy string s2 to s1
    string.h
    strlen()
    Int
    Return the number of character in a string
    string.h
    strset(s,c)
    Char
    Set all character within s to c
    string.h
    strlwr(s)

    Convert uppercase string to lowercase
    string.h
    strupr(s)

    Convert lowercase string to uppercase
    string.h
    system(s)
    Int
    Pass command s to the operating system. Return 0 if the command is successfully executed else non-zero (-1)
    stdlib.h
    tan(d)
    Double
    Return the tangent value of d
    math.h
    tanh(d)
    Double
    Return the hyperbolic tangent value of d
    math.h
    time(p)
    Long
    Return the number of second elapsed beyond a designated base time
    time.h
    toascii(c)
    Int
    Convert value of argument to ascii
    ctype.h
    tolower(c)
    Int
    Convert upper to lowercase
    ctype.h
    toupper(c)
    Int
    Convert lowercase to upper
    ctype.h








    From: Me