English 中文(简体)
1101004 800位数与20位数相对应?
原标题:How do the digits 1101004800 correspond with the number 20?

我试图学会如何利用C++改变记忆地点,在用地雷Sweeper做饭时,我注意到,当钟点的记忆价值为1101,1004800时,这时20秒钟。 1101529088位数为21秒。 请允许我向我解释一下,这些10位数之间的长数转换为10基数?

问题回答

他们正在使用浮体代表时间。 这里有一项方案,将你的 in化物转换成浮动:

#include <stdio.h>

int main() {
  int n = 1101004800;
  int n2 = 1101529088;

  printf("%f
", *((float*)&n));
  printf("%f
", *((float*)&n2));

  return 0;
}

产出:

20.000000
21.000000

1101004800 decimal is 0x41A00000 hex, which is the IEEE-754 representation of 20.0. 1101529088 decimal is 0x41A80000 hex, which is the IEEE-754 representation of 21.0.





相关问题
Prolog difference routine

I need some help with a routine that I am trying to create. I need to make a routine that will look something like this: difference([(a,b),(a,c),(b,c),(d,e)],[(a,_)],X). X = [(b,c),(d,e)]. I really ...

Python: Analyzing complex statements during execution

I am wondering if there is any way to get some meta information about the interpretation of a python statement during execution. Let s assume this is a complex statement of some single statements ...

Python nested lists and recursion problem

I m trying to process a first order logic formula represented as nested lists and strings in python so that that its in disjunctive normal form, i.e [ & , [ | , a , b ], [ | , c , d ]] ...

prolog - why this strange trace

here is the prolog code (which i sort of follow). len([],0). len([_|T],N) :- len(T,X), N is X+1. and here is the trace for it (im running linux, swi) [trace] ?- len([d,f,w,c],X). Call: (7) ...

prolog cut off in method

I have a question I would like to ask you something about a code snippet: insert_pq(State, [], [State]) :- !. insert_pq(State, [H|Tail], [State, H|Tail]) :- precedes(State, H). insert_pq(State, [...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

how to create a parser for search queries

for example i d need to create something like google search query parser to parse such expressions as: flying hiking or swiming -"**walking in boots **" **author:**hamish **author:**reid or ...

Applications of Unification?

What are the (practical) applications of Unification? Where it is actually being used in real world? I couldn t understand the whole idea of what it is really about and why it s considered as a part ...

热门标签