Skip to content

Instantly share code, notes, and snippets.

@zapsys
Created November 11, 2022 20:31
Show Gist options
  • Save zapsys/a0d4bf0d67748893269acbb3fa98f019 to your computer and use it in GitHub Desktop.
Save zapsys/a0d4bf0d67748893269acbb3fa98f019 to your computer and use it in GitHub Desktop.
Programação de Aplicativos - Situação de Aprendizagem 1
#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");
strcpy(nome_lugar, "Lago Azul");
dia = 20;
mes = 5;
ano = 2019;
printf("%s\n", nome_cliente);
printf("%s\n", nome_lugar);
printf("%d/%d/%d\n", dia, mes, ano);
}
@zapsys
Copy link
Author

zapsys commented Nov 11, 2022

No último printf o \n após o especificador %d é opcional. Contudo, garante que, caso tivesse mais uma informação a ser mostrada seria pulada uma linha para exibí-la.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment