How to print prime number in pyramid? Need help

hello,im new to C++, and i got some task to do
please help me to create a program to :
input:
n=5
output=
___2
__3 5 7
11
n=10
_____2
___3 5 7
11 13 19 23 29

(replace _ with blank/space)
if possible using
#include<stdio.h>
and loop.
Topic archived. No new replies allowed.