This repository has been archived by the owner on Dec 31, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Documentación - Github Actions para crearla y publicarla - Páginas de Ejemplo - Ejercicio 1 Boletín 1 - Adaptación del README
- Loading branch information
1 parent
a95ac9c
commit 56c2002
Showing
142 changed files
with
6,248 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Construir documentación | ||
|
||
on: | ||
push: | ||
branches: ["web-docs"] | ||
|
||
permissions: | ||
id-token: write | ||
pages: write | ||
|
||
env: | ||
INSTANCE: docs/pro | ||
ARTIFACT: webHelpPRO2-all.zip | ||
# Writerside docker image version | ||
DOCKER_VERSION: 233.4797 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repositorio | ||
uses: actions/checkout@v3 | ||
|
||
- name: Construir documentación de Writerside usando Docker | ||
uses: JetBrains/writerside-github-action@v4 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
artifact: ${{ env.ARTIFACT }} | ||
docker-version: ${{ env.DOCKER_VERSION }} | ||
|
||
- name: Subir documentación | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs | ||
path: | | ||
artifacts/${{ env.ARTIFACT }} | ||
artifacts/report.json | ||
retention-days: 7 | ||
|
||
test: | ||
# Requires build job results | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Descargar artefactos | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: docs | ||
path: artifacts | ||
|
||
- name: Comprobar documentación | ||
uses: JetBrains/writerside-checker-action@v1 | ||
with: | ||
instance: ${{ env.INSTANCE }} | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
# Requires the build job results | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Descargar artefacto | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: docs | ||
|
||
- name: Descomprimiendo artefacto | ||
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir | ||
|
||
- name: Configurar Pages | ||
uses: actions/configure-pages@v2 | ||
|
||
- name: Subir artefacto | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: dir | ||
|
||
- name: Implementar en GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
|
||
<variables></variables> | ||
<build-profile instance="hi"> | ||
<variables> | ||
<noindex-content>false</noindex-content> | ||
</variables> | ||
</build-profile> | ||
<build-profile instance="pro"> | ||
<variables> | ||
<noindex-content>true</noindex-content> | ||
</variables> | ||
</build-profile> | ||
<build-profile instance="Pro"> | ||
<variables> | ||
<noindex-content>true</noindex-content> | ||
</variables> | ||
</build-profile> | ||
|
||
</buildprofiles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.26) | ||
project(Boletin_1 C) | ||
|
||
set(CMAKE_C_STANDARD 99) | ||
|
||
add_executable(Bol1-Ej01 Ejercicio_01.c) | ||
add_executable(Bol1-Ej02 Ejercicio_02.c) | ||
add_executable(Bol1-Ej03 Ejercicio_03.c) | ||
add_executable(Bol1-Ej04 Ejercicio_04.c) | ||
add_executable(Bol1-Ej05 Ejercicio_05.c) | ||
add_executable(Bol1-Ej06 Ejercicio_06.c) | ||
add_executable(Bol1-Ej07 Ejercicio_07.c) | ||
add_executable(Bol1-Ej08 Ejercicio_08.c) | ||
add_executable(Bol1-Ej09 Ejercicio_09.c) | ||
add_executable(Bol1-Ej10 Ejercicio_10.c) | ||
add_executable(Bol1-Ej11 Ejercicio_11.c) | ||
add_executable(Bol1-Ej12 Ejercicio_12.c) | ||
add_executable(Bol1-Ej13 Ejercicio_13.c) | ||
add_executable(Bol1-Ej14 Ejercicio_14.c) | ||
add_executable(Bol1-Ej15 Ejercicio_15.c) | ||
add_executable(Bol1-Ej16 Ejercicio_16.c) | ||
add_executable(Bol1-Ej17 Ejercicio_17.c) | ||
add_executable(Bol1-Ej18 Ejercicio_18.c) | ||
add_executable(Bol1-Ej19 Ejercicio_19.c) | ||
add_executable(Bol1-Ej20 Ejercicio_20.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en lenguaje C que solicite el nombre y la | ||
* edad de un usuario por teclado de forma que el ordenador le salude indicándole | ||
* la edad que tiene. | ||
* in: NOMBRE Y EDAD | ||
* out: SALUDO | ||
* NOTA1: | ||
*/ | ||
|
||
#define MAX 20 // SE DECLARA EL TAMAÑO MÁXIMO Y SE ASIGNA POSTERIORMENTE EN nombre[MAX] | ||
// NUNCA SOBREESCRIBIR EL LIMITE, YA QUE SERÍA UN MEMORY OVERFLOW Y ESO ES GRAVISIMO 0 :( | ||
int main() { | ||
char letra = 'A'; | ||
char nombre[MAX] = "Ana"; | ||
int edad; | ||
// Entrada de Valores | ||
puts("Escribe tu nombre en la siguiente linea: "); | ||
gets(nombre); | ||
printf("Escribe tu edad a continuación: "); | ||
scanf("%d", &edad); | ||
// Salida en Pantalla | ||
printf("Hola %s, eres guapisim@ para tener %d años.",nombre,edad); | ||
|
||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en que solicite el nombre, apellidos y edad | ||
* de un usuario por teclado y que le muestre el siguiente mensaje por pantalla. | ||
* NOTA: Utilice la edad de jubilación como una constante con valor 67 años. | ||
* in: NOMBRE, APELLIDOS Y EDAD | ||
* out: Sr/Sra. Apellido, le faltan aún X años para jubilarse | ||
* NOTA1: | ||
*/ | ||
#define MAX 30 | ||
|
||
int main() { | ||
char nombre[MAX], apellido1[MAX], apellido2[MAX]; | ||
int edad, edadjubil = 67, tjubil; | ||
// Mensajes y Lectura de entrada Intento 2 | ||
printf("Introduzca su nombre y sus apellidos a continuación: "); | ||
scanf("%s %s %s",nombre,apellido1,apellido2); | ||
printf("Ahora, introduzca su edad: "); | ||
scanf("%d",&edad); | ||
|
||
/* | ||
// Mensajes y Lectura de entrada Intento 1 | ||
printf("Nombre: "); | ||
gets(nombre); | ||
printf("Primer Apellido: "); | ||
gets(apellido1); | ||
printf("Segundo Apellido: "); | ||
gets(apellido2); | ||
*/ | ||
|
||
// Operación | ||
tjubil = edadjubil - edad; | ||
|
||
// Salida en Pantalla | ||
printf("Sr/Sra. %s, le faltan aún %d años para jubilarse",apellido1,tjubil); | ||
// printf("%s %s %s %d",nombre,apellido1,apellido2,edad); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en Lenguaje C que solicite por teclado la | ||
* base y altura de un triángulo rectángulo y muestre por pantalla su superficie. | ||
* Presente la salida con el siguiente formato. | ||
* in: BASE Y ALTURA | ||
* out: La superficie del triángulo de base XX.XX y altura YY.YY es ZZ.ZZ | ||
* NOTA1: | ||
*/ | ||
#define superficie3(x, y) ((x*y)/2) // Defino la fórmula del area del triángulo | ||
|
||
int main() { | ||
float base, altura; | ||
|
||
// INPUT | ||
|
||
puts("En la siguiente linea indique los datos solicitados de su triángulo (en metros): "); | ||
printf("\t\tBase: "); | ||
scanf("%f", &base); | ||
printf("\t\tAltura: "); | ||
scanf("%f", &altura); | ||
|
||
// OUTPUT | ||
printf("\nLa superficie del triángulo de base %.2f m y altura %.2f m es %.2f m.", base, altura, | ||
superficie3(base, altura)); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en Lenguaje C que solicite por teclado los | ||
* lados de un rectángulo y muestre por pantalla su superficie. | ||
* in: BASE Y ALTURA | ||
* out: SUPERFICIE DEL RECTÁNGULO | ||
* NOTA1: | ||
*/ | ||
#define superficie2(x, y) (x*y) // DECLARO LA FÓRMULA DE LA SUPERFICIE DE UN RECTÁNGULO | ||
|
||
int main() { | ||
float base, altura; | ||
|
||
//INPUT | ||
puts("Introduzca, en la siguiente linea, los datos solicitados sobre su rectángulo:"); | ||
printf("\t\tBase: "); | ||
scanf("%f", &base); | ||
printf("\t\tAltura: "); | ||
scanf("%f", &altura); | ||
|
||
//OUTPUT | ||
printf("\nSiendo la base del rectángulo %.2f m y su altura %.2f m, el area del rectángulo es %.2f m.", base, altura, | ||
superficie2(base, altura)); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en Lenguaje C que solicite por teclado los | ||
* lados de un rectángulo y muestre por pantalla su superficie. | ||
* in: BASE Y ALTURA | ||
* out: SUPERFICIE DEL RECTÁNGULO | ||
* NOTA1: | ||
*/ | ||
#define superficie2(x, y) (x*y) // DECLARO LA FÓRMULA DE LA SUPERFICIE DE UN RECTÁNGULO | ||
|
||
int main() { | ||
float base, altura; | ||
|
||
//INPUT | ||
puts("Introduzca, en la siguiente linea, los datos solicitados sobre su rectángulo:"); | ||
printf("\t\tBase: "); | ||
scanf("%f", &base); | ||
printf("\t\tAltura: "); | ||
scanf("%f", &altura); | ||
|
||
//OUTPUT | ||
printf("\nSiendo la base del rectángulo %.2f m y su altura %.2f m, el area del rectángulo es %.2f m.", base, altura, | ||
superficie2(base, altura)); | ||
|
||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// Created by Pablo on 04/12/2023. | ||
// | ||
#include <stdio.h> | ||
/* | ||
* AUTOR: PABLO PORTAS | ||
* OBJETIVO: | ||
* Plantee e implemente un programa en Lenguaje C que pida el radio de una | ||
* esfera y calcule su área y su volumen. | ||
* in: RADIO | ||
* out: AREA Y VOLUMEN DE UNA ESFERA | ||
* NOTA1: | ||
*/ | ||
# define PI 3.14159265359 | ||
# define area(x) (4 * PI * x * x) | ||
# define volumen(x) ((4/(float)3) * PI * x * x * x) | ||
|
||
int main() { | ||
// PI = 3.14159265359 | ||
//double volumen, area; | ||
float radio; | ||
|
||
// ENTRADA | ||
puts("Introduzca los valores solicitados:"); | ||
printf("\t\tEl radio de su esfera: "); | ||
scanf("%f", &radio); // Para double usar &lf | ||
|
||
// PROCESO | ||
|
||
// ANTES DE CONOCER EL DEFINE | ||
// // No usar 4 / 3, ya que es impreciso. Preferiblemente 4 / 3.0 o 4 / (float)3 | ||
// volumen = (4 / (float) 3) * PI * r * r * r; | ||
// area = 4 * PI * r * r; | ||
|
||
// SALIDA | ||
printf("\nEl valor del area %.3f m^2 y el volumen %.3f m^3.\n", area(radio), volumen(radio)); | ||
printf("Redondeando PI a 3.14159265359"); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.