Like Tree7Likes
  • 4 Post By Matticus
  • 1 Post By Tomwa
  • 2 Post By jimblumberg

Need help for find prime numbers among from 50 numbers... please anyone help me...

This is a discussion on Need help for find prime numbers among from 50 numbers... please anyone help me... within the C Programming forums, part of the General Programming Boards category; Today i'm Going to attend one interview.. there will be asking a question... Qus: Write a program using C , ...

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    3

    Lightbulb Need help for find prime numbers among from 50 numbers... please anyone help me...

    Today i'm Going to attend one interview..
    there will be asking a question...

    Qus: Write a program using C, Getting 50 numbers from user and find which are the prime numbers and which are not prime numbers? and display separately?



    please help me...
    i failed that interview,, i feel very sad,,,,
    pls give the correct program to me....

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    2,692
    @mods: double post

  3. #3
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,694
    Quote Originally Posted by jothimani1991 View Post
    Today i'm Going to attend one interview..
    What kind of interview is that, that they ask this kind of things? :P :P :P

    and yes Matticus is right!
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  4. #4
    Registered User
    Join Date
    Jan 2013
    Posts
    3
    this is the c++ programmer interview pls give code for this

  5. #5
    Registered User
    Join Date
    Jun 2011
    Posts
    2,692
    1. Please stick to just one thread (your other one is probably best).
    2. C++ related questions belong on the C++ board, not the C board.
    3. You won't receive a full solution here. If you have to be given code for such a simple problem, then you clearly aren't qualified for the position in which you're interviewing for. Consider an alternative career.

  6. #6
    Registered User
    Join Date
    Oct 2012
    Posts
    22
    Quote Originally Posted by jothimani1991 View Post
    this is the c++ programmer interview pls give code for this
    What purpose would there be in giving you code for an interview? Even if we did give you the full and working code (Which isn't that hard) you'd never be able to perform the job. My guess is this problem is meant to screen out those who lack basic knowledge.

    Edit: Matticus beat me to the punch, good post.
    Crossfire likes this.

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    2,917
    First if this is for a C++ programmer interview why did you post in the C forum? Next I suggest you post your best try at fulfilling the requirements and then ask specific questions. If your other post is your best try at fulfilling the requirements then I would say you are not ready to start working as a C or C++ programmer as of yet. For starters the in the first three lines of your program you have constructs that most employers would find intolerable. The use of the conio.h header file along with void main() are sure signs of a person either lacking knowledge or a person that is not keeping their knowledge current .

    Jim
    Crossfire and stahta01 like this.

  8. #8
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,501
    Sounds like you are a beginner in the C languages - If you want a job in programming C, that's ok, but you'll have to put in a bit of work first.

    There are online tutorials here C programming.com - Learn C and C++ Programming - Cprogramming.com

    Buy a book (think of it as an investment into your future career)

    For algorithm development, I recommend you go through Project Euler (If you answer questions 7 and 10, you are provided with very good mathematical algorithms for prime numbers)

    I sincerely wish you good luck with your learning
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-16-2012, 03:07 AM
  2. non prime numbers or composite numbers program.help plz!
    By danishzaidi in forum C Programming
    Replies: 10
    Last Post: 11-15-2011, 11:10 AM
  3. for loop to find prime numbers
    By lsecrease in forum C Programming
    Replies: 2
    Last Post: 03-30-2006, 01:58 AM
  4. for loop to find prime numbers
    By 1rwhites in forum C Programming
    Replies: 11
    Last Post: 10-21-2005, 11:37 AM
  5. prime numbers
    By Murdogg7 in forum C Programming
    Replies: 1
    Last Post: 09-25-2002, 04:04 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21