#include <stdio.h>

int main()
{
  int paneles;
  int postes;
  printf ("Introduce el número de paneles: ");
  scanf ("%d", &paneles);
  printf ("%d\n", paneles);
  postes= paneles+1;
  for (int i=1; i<=postes; i++)
      {
        printf ("|");
        if (i<=paneles)
        {
          printf ("-");
        }
      }
  printf ("\nNº de postes: %d\n", postes);
  return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: