d3dx939dll

Aula39 - Estruturas

Jan 18th, 2021 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.    
  5.     //definição de uma estrutura
  6.     struct horario
  7.     {
  8.         int horas;
  9.         int minutos;
  10.         int segundos;
  11.     };
  12.  
  13.     //declaração de uma estrutura
  14.     struct horario agora;
  15.  
  16.     //inicialização das variaveis
  17.     agora.horas = 12;
  18.     agora.minutos = 30;
  19.     agora.segundos = 55;
  20.  
  21.     printf("%i:%i:%i\n", agora.horas, agora.minutos, agora.segundos);
  22.     return 0;
  23. }
  24.  
  25. //Sobre
  26.  
  27. //Aula: Introdução Estruturas (#39)
  28. //Video: youtube.com/watch?v=P1XGznGxsag
  29. //Artigo: linguagemc.com.br/struct-em-c/
  30.  
Add Comment
Please, Sign In to add comment