Skip to content

Instantly share code, notes, and snippets.

@gabrielcesar
Last active June 17, 2016 02:23
Show Gist options
  • Save gabrielcesar/dc5d8ea5a963055c92daf294aeec7e2a to your computer and use it in GitHub Desktop.
Save gabrielcesar/dc5d8ea5a963055c92daf294aeec7e2a to your computer and use it in GitHub Desktop.
UFOPA. Programação. Arquivo: exemplo1.c. Data: 16/06/2016.
/*
* 16/06/2016
* exemplo1.c
*/
#include <stdio.h>
int main ( void )
{
// Declaração de variáveis
int num1;
int num2;
int media;
/* Inicialização
de
Variáveis */
num1 = 6;
num2 = 8;
media = 0;
media = ( num1 + num2 ) / 2;
printf ( "A média do número 1 e número 2 é: %d.\n", media );
printf ( "A média do %d e %d é: %d.\n", num1, num2, media );
printf ( "%d, %d, %d.\n", num1, num2, media );
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment