From 37ad8c191329e2b7265400ab015a755f52e37b06 Mon Sep 17 00:00:00 2001 From: Griezman2003 Date: Sat, 13 May 2023 14:33:09 -0600 Subject: [PATCH] Ejercios de factorial y pascal --- app/Commands/Factorial.php | 51 ++++++++++++++++++++++++ app/Commands/Pascal.php | 80 ++++++++++++++++++++++++++++++++++++++ composer.json | 2 +- config/app.php | 2 +- application => ejercicios | 0 5 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 app/Commands/Factorial.php create mode 100644 app/Commands/Pascal.php rename application => ejercicios (100%) diff --git a/app/Commands/Factorial.php b/app/Commands/Factorial.php new file mode 100644 index 0000000..d389feb --- /dev/null +++ b/app/Commands/Factorial.php @@ -0,0 +1,51 @@ + 0; $i--) + { + $fact= $fact * $i; + } + echo "El numero factorial es el siguiente = ".$fact; + + } + + /** + * Define the command's schedule. + * + * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @return void + */ + public function schedule(Schedule $schedule): void + { + // $schedule->command(static::class)->everyMinute(); + } +} diff --git a/app/Commands/Pascal.php b/app/Commands/Pascal.php new file mode 100644 index 0000000..175d451 --- /dev/null +++ b/app/Commands/Pascal.php @@ -0,0 +1,80 @@ +command(static::class)->everyMinute(); + } +} diff --git a/composer.json b/composer.json index 04e3f6d..015f7b0 100644 --- a/composer.json +++ b/composer.json @@ -47,5 +47,5 @@ }, "minimum-stability": "stable", "prefer-stable": true, - "bin": ["application"] + "bin": ["ejercicios"] } diff --git a/config/app.php b/config/app.php index f4476ba..c4da86f 100644 --- a/config/app.php +++ b/config/app.php @@ -13,7 +13,7 @@ return [ | */ - 'name' => 'Application', + 'name' => 'Ejercicios', /* |-------------------------------------------------------------------------- diff --git a/application b/ejercicios similarity index 100% rename from application rename to ejercicios