I have given in both C and Python with three three code each
C
#include <stdio.h>
#include <stdlib.h>
void main(){
int i,n,*x,*y,*z;
printf("Enter the no. of edges or no. of vertices of the polygon : ");
scanf("%d",&n);
x=(int*)malloc(n*sizeof(int));
y=(int*)malloc(n*sizeof(int));
z=(int*)malloc(n*sizeof(int));
for(i=0;i<n;i++){
printf("Enter x cordinate of vertex %d :",i+1);
scanf("%d",&x[i]);
printf("Enter y cordinate of vertex %d :",i+1);
scanf("%d",&y[i]);
printf("Enter z cordinate of vertex %d :",i+1);
scanf("%d",&z[i]);
}
printf("Following are the vertex of the polygon :\n");
for(i=0;i<n;i++){
printf("v%d(%d,%d,%d)\n",i+1,x[i],y[i],z[i]);
}
}
PYTHON
d={}
n=int(input("Enter the number of edges or vertices: "))
for i in range(n):
a=int(input("Enter the x-coordinate of vertex"+str(i+1)+" : "))
b=int(input("Enter the y-coordinate of vertex"+str(i+1)+" : "))
c=int(input("Enter the z-coordinate of vertex"+str(i+1)+" : "))
d[i]=[a,b,c]
print("Following are the coordinates of each vertex of the polygon:")
for i in range(n):
print("V",i+1,"(",d[i][0],",",d[i][1],",",d[i][2],")")