fork download
  1. #include <stdio.h>
  2.  
  3. struct student {
  4. int id;
  5. char blood_type;
  6. double height;
  7. }asano, yoshino;
  8.  
  9. int main(void) {
  10. asano.id=1;
  11. asano.blood_type='A';
  12. asano.height=165.2;
  13.  
  14. yoshino.id=2;
  15. yoshino.blood_type='O';
  16. yoshino.height=177.0;
  17.  
  18. printf("id : %d\n",asano.id);
  19. printf("blood_type : %c\n",asano.blood_type);
  20. printf("height : %f\n",asano.height);
  21. printf("id : %d\n",yoshino.id);
  22. printf("blood_type : %c\n",yoshino.blood_type);
  23. printf("height : %f\n",yoshino.height);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
id          : 1
blood_type  : A
height      : 165.200000
id          : 2
blood_type  : O
height      : 177.000000