Search
 
SCRIPT & CODE EXAMPLE
 

C

converting time in c

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

int main() {
   char t[10];
   scanf("%s", t);

   if(t[8] == 'P') {
     if(t[0] != '1' || t[1] != '2') {
       t[0]++;
       t[1]+=2;
     }
   } else {
     if(t[0] == '1' && t[1] == '2') {
       t[0] = '0';
       t[1] = '0';
     }
   }
   t[8] = '';
   printf("%s
", t);
    
   return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: denomination counter 
C :: elastic search url date 
C :: how to compress a file in c 
C :: C static libraries creation 
C :: WARNING: QA Issue: rdepends on 
C :: c++ convert to c online 
C :: what the value in array not initialized yet c 
C :: This C Program is used to find the greatest among ten numbers. 
C :: deepak rake 
C :: ::template 
C :: C Create union variables 
C :: cannot reach esp8266 via udp while he is running with a static ip 
C :: Trasmettere variabile float attraverso seriale 
C :: + ********************* 
C :: navigate to line intellij 
C :: sort vectors c 
C :: c program structure 
C :: Happy New Year! 
C :: open cv 
Dart :: python read json from url 
Dart :: remove appbar shadow flutter 
Dart :: rupee icon in flutter 
Dart :: change hint text color flutter 
Dart :: dart timer 
Dart :: scaffold background color gradient 
Dart :: dart async vs async* 
Dart :: no scroll physics flutter 
Dart :: dart convert int string leading zeros 
Dart :: how to load gif in flutter 
Dart :: add border color to one side and rounded border container flutter 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =