User Profile

Collapse

Profile Sidebar

Collapse
shamik
shamik
Last Activity: Jul 25 '07, 06:54 AM
Joined: Dec 4 '06
Location: India
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • shamik
    replied to Help on program
    in C
    the whole program is like this :

    int flag = 1;

    for ( i=2;i<1000;i++)
    {
    for( j=2;j<=i;i++)
    {
    if(i%j==0)
    {
    flag++;
    }
    }
    if(flag<=2)
    {
    cout<<i<<endl;
    }
    flag = 0;
    }

    finish

    The above post might have some...
    See more | Go to post

    Leave a comment:


  • shamik
    replied to Help on program
    in C
    the above one seems to be quite difficult to understand
    here is a very simple logic.

    define an integer flag to keep track and initalize it.
    int flag = 1;

    now start a loop from starting no. i.e 2 till half of the ending no. i.e 500 (half of 1000) because no number greater than 500 would be able to devide 1000 exactly.

    like this :

    for(i=2;i<=500; i++)

    then start...
    See more | Go to post

    Leave a comment:


  • shamik
    replied to serial port communication in LINUX
    in C
    thanks for the links
    they are really very helpful

    thanks and regards
    shamik
    See more | Go to post

    Leave a comment:


  • shamik
    started a topic serial port communication in LINUX
    in C

    serial port communication in LINUX

    hii friends

    does anybody know how to do serial communication (through) serial port in linux using c++?
    I am using redhat-9. it would be better if someone can provide with eg. codes of client and server to send and recieve data.

    please tell me step by step procedure.

    regards
    shamik
    See more | Go to post

  • shamik
    replied to How to read string with space (help please)
    in C
    use gets(address) instead of cin>>address

    and puts(address) instead of cout<<address
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...