SHARE
TWEET

Untitled

a guest Jul 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. typedef
  2. struct mini
  3. {
  4.     int time;
  5.     char st;
  6.     char NZ[10];
  7. }mini;
  8. mini parsing(char *input)
  9. {
  10.     // 17:55 * CAR1
  11.     int i = 0, a, b;
  12.     a = atoi(input);
  13.     a = a * 60;
  14.     while (input[i] != ' ')
  15.     {
  16.         if (input[i] == ':')
  17.         {
  18.             break;
  19.         }
  20.         i++;
  21.     }
  22.     i++;
  23.     b = atoi(input + i);
  24.     mini c;
  25.     c.time = a + b;
  26.  
  27.  
  28.     return c;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top