From a15cb10b5350e48e94b861f9506de2eca9d3d7c0 Mon Sep 17 00:00:00 2001 From: Bobertkiller Date: Thu, 1 Jun 2023 13:23:29 -0300 Subject: [PATCH] initial commit(errors present) Signed-off-by: Bobertkiller --- .gitignore | 2 ++ calc.c | 11 +++++++++++ src/functions.c | 23 +++++++++++++++++++++++ src/functions.h | 5 +++++ src/intro.py | 15 +++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 calc.c create mode 100644 src/functions.c create mode 100644 src/functions.h create mode 100644 src/intro.py diff --git a/.gitignore b/.gitignore index c6127b3..9c294fc 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,5 @@ modules.order Module.symvers Mkfile.old dkms.conf + +test diff --git a/calc.c b/calc.c new file mode 100644 index 0000000..96bf613 --- /dev/null +++ b/calc.c @@ -0,0 +1,11 @@ +#include + +#include "src/functions.h" + +int main(void){ + + + system("python src/intro.py"); + + +} diff --git a/src/functions.c b/src/functions.c new file mode 100644 index 0000000..f5a9302 --- /dev/null +++ b/src/functions.c @@ -0,0 +1,23 @@ +#include + +//gera matrix com parametros inseridos e devolve a marix +float gera_matrix(int linha,int coluna){ + + float inserir; + float devolver[linha][coluna]; + + for (int i =0; i < linha; i++){ + + for(int j =0; j < coluna; j++){ + + printf("please insert value for line %d column %d:",i,j); + scanf("%f", &inserir); + devolver[i][j]=inserir; + + } + + } + + + return devolver[linha][coluna]; +} \ No newline at end of file diff --git a/src/functions.h b/src/functions.h new file mode 100644 index 0000000..124c686 --- /dev/null +++ b/src/functions.h @@ -0,0 +1,5 @@ +#ifndef FUNCTIONS_H +#define FUNCTIONS_H + +float gera_matrix(int, int); + diff --git a/src/intro.py b/src/intro.py new file mode 100644 index 0000000..1d838c7 --- /dev/null +++ b/src/intro.py @@ -0,0 +1,15 @@ +import os + +os.system("cls || clear") +intro = """Welcome to Pelops II mathematical modeling solver + +The program is made with the intention to help college students +to solve their mathematical modeling problems/exercises, and in further updates show +the process of problem solving to make this program useful for studying + +If there are any Bugs, i appreciate feedback at my github: https://github.com/Bobertkiller + +""" + +print(intro) +