• Forum
  • Lounge
  • How to print prime number in pyramid? Ne

 
How to print prime number in pyramid? Need help

how to create a program to create:
input:n=5
2
3 5 7
11
n=10
2
3 5 7
11 13 19 23 29
if possible using
#include<stdio.h>
and loop.
n=5
___2
__3 5 7
11
n=10
_____2
___3 5 7
11 13 19 23 29
Please move this to either the Beginner or General section of the forums.

You need to show us what you have. Most users on here will not do your work for you, and we try to discourage people from doing so. So please update your post with what you have so far and what you are having trouble with.
Topic archived. No new replies allowed.