-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPythonvsCProgramlama2.py
64 lines (43 loc) · 1.36 KB
/
PythonvsCProgramlama2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
"""
) ( (
( /( )\ ) )\ ( ) ) (
)\()) ((_) ( /( ((_) )\ ) ( /( ( ( /( )(
((_)\ _ )(_)) _ (()/( )(_)) )\ )(_)) (()\
| |(_) | | ((_)_ | | )(_)) ((_)_ ((_) ((_)_ ((_)
| '_ \ | | / _` | | | | || | / _` | (_-< / _` | | '_|
|_.__/ |_| \__,_| |_| \_, | \__,_| /__/ \__,_| |_|
|__/
"""
import datetimet = datetime.datetime.today()
print(f'{t}')# 2020-01-16 22:08:45.310966
#include <stdio.h>
#include <time.h>int main()
{
time_t timer;
char buffer[26];
struct tm* tm_info; timer = time(NULL);
tm_info = localtime(&timer);
strftime(buffer, 26, "%Y-%m-%d %H:%M:%S", tm_info);
puts(buffer);return 0;
}// 2020-01-16 22:16:52
x = 251
print("The decimal value of", x, "is:")
print( bin(x) , "in binary.")
print( oct(x) , "in octal.")
print( hex(x) , "in hexadecimal.")# The decimal value of 251 is:
# 0b11111011 in binary.
# 0o373 in octal.
# 0xfb in hexadecimal.
#include <stdio.h>
int main()
{
unsigned int u = 57054; printf( "u = %u \n ", u) ;
printf( "u = %o \n ", u) ;
printf( "u = %X \n ", u) ; return 0;
}// u = 57054
// u = 157336
// u = DEDE
return albatross # doğru
return(albatross) # yanlıs
return albatross; // correct
return(albatross); // incorrect