From: Alexandre P Francisco Date: Tue, 23 Feb 2016 15:27:05 +0000 (+0000) Subject: Add aula01/*. X-Git-Url: http://web.ist.utl.pt/aplf/git/?a=commitdiff_plain;h=85e2f8a130229218300c77bb20c1afb630e492a0;p=iaed.git Add aula01/*. --- diff --git a/aula01/ct.c b/aula01/ct.c new file mode 100644 index 0000000..68ada24 --- /dev/null +++ b/aula01/ct.c @@ -0,0 +1,21 @@ +#include + +/* Conversao Fahrenheit-Celsius */ + +#define INFERIOR 0 +#define SUPERIOR 300 +#define PASSO 20 + +int main () +{ + double fahr, celsius; + + fahr = INFERIOR; + while (fahr <= SUPERIOR) + { + celsius = 5 * (fahr-32) / 9; + printf("%5.1lf\t%6.2lf\n", fahr, celsius); + fahr = fahr + PASSO; + } + return 0; +} diff --git a/aula01/hello.c b/aula01/hello.c new file mode 100644 index 0000000..abc6028 --- /dev/null +++ b/aula01/hello.c @@ -0,0 +1,7 @@ +#include +#include + +int main() { + printf("Olá mundo!\n"); + return EXIT_SUCCESS; +}