I've written this some time ago to display another shape,you can modify it and use accordingly
#include <stdio.h>
int main(){
int x,y;
for( x=1;x<10;x++){
for( y=0;y<x;y++)
printf("*");
for( y=0;y<(10-x);y++)
printf("~");
for( y=0;y<(10-x);y++)
printf("~");
for( y=0;y<x;y++)
printf("*")...