User Profile

Collapse

Profile Sidebar

Collapse
janutovianca
janutovianca
Last Activity: May 15 '10, 12:30 PM
Joined: May 12 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • janutovianca
    replied to how to print first n primes?
    in C
    actually...i've already got how to print prime numbers but the next problem i'm having now is how to print the first n primes, not the prime numbers from 0 to n.

    i really did appreaciate your replies.

    this is my code:
    Code:
    #include<stdio.h> 
    
    main() 
    { 
    int x,y,n; 
    printf(" Enter n: "); 
    scanf("%d",&n); 
    printf("\n");
    ...
    See more | Go to post

    Leave a comment:


  • janutovianca
    started a topic how to print first n primes?
    in C

    how to print first n primes?

    hey there!!!

    we were asked to make a code for printing prime numbers from 3 until the [I]n[I]th prime number but i can't seem to find the right solution for this one.

    when i print my work it prints some other numbers that has the factor of another prime number

    it prints the numbers:
    3, 5, 7, 9 ,11, 13, 15...

    i'm a beginner here, so please help me.
    i really would appreciate...
    See more | Go to post
No activity results to display
Show More
Working...