xickoh

credits

Jan 7th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. #ifdef _WIN32
  2. #include <conio.h>
  3. #else
  4. #include <stdio.h>
  5. #define clrscr() printf("\e[1;1H\e[2J")
  6. #endif
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include <malloc.h>
  10. #include <time.h>
  11. #include <math.h>
  12. #include "LP_Leitura.h"
  13. #include "LP_Utils.h"
  14. #include "common.h"
  15. #include "cpu.h"
  16. #include "history.h"
  17. #include "human.h"
  18.  
  19. struct credits {
  20. char name[50];
  21. int number;
  22. int group;
  23. int class;
  24. } person[3];
  25.  
  26. /*
  27. * To change this license header, choose License Headers in Project Properties.
  28. * To change this template file, choose Tools | Templates
  29. * and open the template in the editor.
  30. */
  31.  
  32.  
  33. void printCredits() { //Print the credits for each person
  34. int i;
  35. for (i = 0; i < 3; i++) {
  36. printf("Nome: %s\nNùmero: %d\nGrupo: %d\nTurma: %d\n\n", person[i].name, person[i].number, person[i].group, person[i].class);
  37. }
  38. }
  39.  
  40. void credits() {
  41. clrscr(); //Clear the screen
  42. printf("Créditos\n");
  43.  
  44. //Assign values to each person
  45.  
  46. strcpy(person[0].name, "Francisco Nogueira");
  47. strcpy(person[1].name, "Juliana Martins");
  48. strcpy(person[2].name, "Pedro Henriques");
  49. person[0].number = 8160574;
  50. person[1].number = 8160177;
  51. person[2].number = 8160584;
  52. person[0].group = 100;
  53. person[1].group = 100;
  54. person[2].group = 100;
  55. person[0].class = 1;
  56. person[1].class = 1;
  57. person[2].class = 1;
  58. printCredits();
  59.  
  60. printf("Clique no Enter para continuar");
  61. getchar();
  62. }
Add Comment
Please, Sign In to add comment