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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void main() { | |
char nome_cliente[30]; | |
char nome_lugar[30]; | |
int dia, mes, ano; | |
strcpy(nome_cliente, "Pablo Augusto"); |
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
#include <stdio.h> // Biblioteca de entrada e saída (Input/Output) | |
#include <locale.h> // Biblioteca de localização (idioma do SO/teclado/acentuação) | |
#include <stdlib.h> // Biblioteca padrão do C | |
float calcula(float a, float b, char c) // Função com 3 parâmetros que retorno um número do tipo float | |
{ | |
float resultado; // Declaração de variável e tipo | |
switch(c) // Início do laço de repetição (switch/case) | |
{ | |
case'+': // Caso sinal de + retorna a soma de a e b |