fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. static void print_centered(const char *const string, uint8_t length)
  5. {
  6. printf("|%*s%s%*s", length / 2, "", string, length / 2, "");
  7. }
  8.  
  9.  
  10. int main(void) {
  11. // your code goes here
  12. print_centered("Command", 16);
  13. print_centered("Title", 16);
  14. print_centered("Description", 16);
  15. print_centered("Supported ROICs", 16);
  16. printf("|\n");
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
|        Command        |        Title        |        Description        |        Supported ROICs        |