0

how to convert local time to global time by c program?

want to a simple code where not used <time.h> header file. I want this output from program: input: 10 35 am output: 10 35 input: 10 35 pm output: 22 35

7th Jun 2017, 3:39 AM
Tanvir Ahmed Nabil
Tanvir Ahmed Nabil - avatar
11 Answers
+ 1
will the input be given by user or automatically collected from machine? if its a user input no problem otherwise u hv to use time.h library. please provide the necessary info then i cn help
7th Jun 2017, 3:50 AM
abhrodeep chanda
abhrodeep chanda - avatar
+ 1
this input will be given by user.
7th Jun 2017, 3:52 AM
Tanvir Ahmed Nabil
Tanvir Ahmed Nabil - avatar
0
u want a basic c code or c++? i mean #include<stdio.h> that one?
7th Jun 2017, 3:55 AM
abhrodeep chanda
abhrodeep chanda - avatar
0
I mentioned programming language c.
7th Jun 2017, 3:56 AM
Tanvir Ahmed Nabil
Tanvir Ahmed Nabil - avatar
0
ok i'll b back wd the code
7th Jun 2017, 3:57 AM
abhrodeep chanda
abhrodeep chanda - avatar
0
hye bro! r u there?
7th Jun 2017, 4:44 AM
Tanvir Ahmed Nabil
Tanvir Ahmed Nabil - avatar
0
see this one try it in basic c compatible compilers https://code.sololearn.com/c42koeG7zXv8/?ref=app
7th Jun 2017, 12:19 PM
abhrodeep chanda
abhrodeep chanda - avatar
0
please atleast praise me if it helps! its not c++ or c# its written in basic c language
7th Jun 2017, 12:21 PM
abhrodeep chanda
abhrodeep chanda - avatar
0
working code c++ input hh_mm_am/pm by space or separate line https://code.sololearn.com/c2G3s8sBhC39/?ref=app
7th Jun 2017, 1:25 PM
abhrodeep chanda
abhrodeep chanda - avatar
0
I can't run this c language code. it's showing me "segmentation fault". please bro check it one more.
7th Jun 2017, 5:35 PM
Tanvir Ahmed Nabil
Tanvir Ahmed Nabil - avatar
0
its working 2nd one will run in sololearn itself!
7th Jun 2017, 6:54 PM
abhrodeep chanda
abhrodeep chanda - avatar