Bitcoin Forum
May 28, 2024, 10:21:56 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What does %number of BTC worth If one BTC was at x rate  (Read 427 times)
MehdiBmm (OP)
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250


View Profile
August 14, 2016, 05:48:56 PM
 #1

Hey folks,

As I'm a C++ programmer (don't get scared, I'm a beginner Tongue), I was playing around with something.

I said to myself, how much x numbers of coins would have costed If one bitcoin was worth y. And I made a software based of that.

What you do Is, you input the current price of one BTC and you'll get asked to put the number of coins that you want to calculate.

I got this saved on an online IDE so that you don't have to download anything. Tell me what you think about this!

Link : http://cpp.sh/8r7oq
Mastsetad
Sr. Member
****
Offline Offline

Activity: 672
Merit: 250



View Profile
August 14, 2016, 05:56:28 PM
 #2

Looks good.
Just calculated the amount of bitcoins i earn in a month and got the result, but now the price is quite low so the estimate i got from there is a little lower then my expectations but i'm sure price will rise again and i will get what i expect from my earnings.
coin_gambler
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250

CryptoTalk.Org - Get Paid for every Post!


View Profile
August 14, 2016, 05:59:18 PM
 #3

to be honest it just multiplies 2 numbers that you give to the program, it is the easiest thing possible, though if you like programming then i guess dont stop, even the smallest things can become big

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
YoBit AirDrop $|
Get 700 YoDollars for Free!
🏆
MehdiBmm (OP)
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250


View Profile
August 14, 2016, 06:01:18 PM
 #4

Looks good.
Just calculated the amount of bitcoins i earn in a month and got the result, but now the price is quite low so the estimate i got from there is a little lower then my expectations but i'm sure price will rise again and i will get what i expect from my earnings.

Oh nice, the price is so volatile these days, I think It'll rise too.

to be honest it just multiplies 2 numbers that you give to the program, it is the easiest thing possible, though if you like programming then i guess dont stop, even the smallest things can become big

Yeah exactely, I'm running out of ideas, If someone has some I would really consider this as I want to improve my skills Wink
franky1
Legendary
*
Offline Offline

Activity: 4228
Merit: 4501



View Profile
August 14, 2016, 06:07:40 PM
 #5

X * Y

good start as a lesson one for c++
but maths gets more fun when you start grabbing real bitcoin data(live and historic) to find patterns

like:
part 1
getting the hashpower of mining pools and calculating how many mining ASICs total that hashpower.
then getting the number of blocks that pool solved to get a income amount.
then doing the maths to work out profitability and ROI just based on the known retail prices of ASICs vs income of those ASICs

then getting the same data each day over a certain period, or finding historic data to save you having to wait around to accumilate data, to account for the variation of ROI depending on difficulty changes and competition

part 2
after getting a long term list of results to show the variations of income / ROI projections.
putting those numbers against bitcoins price history to then see a rough guide to the speculative difference over that time

that kind of information is something people like to see

not only would the above help you learn more math. but also how to API call data or scrape data from other sources

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
MehdiBmm (OP)
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250


View Profile
August 14, 2016, 06:15:40 PM
 #6

X * Y

good start as a lesson one for c++
but maths gets more fun when you start grabbing real bitcoin data(live and historic) to find patterns

like:
part 1
getting the hashpower of mining pools and calculating how many mining ASICs total that hashpower.
then getting the number of blocks that pool solved to get a income amount.
then doing the maths to work out profitability and ROI just based on the known retail prices of ASICs vs income of those ASICs

then getting the same data each day over a certain period, or finding historic data to save you having to wait around to accumilate data, to account for the variation of ROI depending on difficulty changes and competition

part 2
after getting a long term list of results to show the variations of income / ROI projections.
putting those numbers against bitcoins price history to then see a rough guide to the speculative difference over that time

that kind of information is something people like to see

not only would the above help you learn more math. but also how to API call data or scrape data from other sources

Yeah actually that's my weakest spot, sockets and API's since I have to use libraries and It gets complicated Cheesy
franky1
Legendary
*
Offline Offline

Activity: 4228
Merit: 4501



View Profile
August 14, 2016, 06:23:28 PM
 #7

X * Y

good start as a lesson one for c++
but maths gets more fun when you start grabbing real bitcoin data(live and historic) to find patterns

like:
part 1
getting the hashpower of mining pools and calculating how many mining ASICs total that hashpower.
then getting the number of blocks that pool solved to get a income amount.
then doing the maths to work out profitability and ROI just based on the known retail prices of ASICs vs income of those ASICs

then getting the same data each day over a certain period, or finding historic data to save you having to wait around to accumilate data, to account for the variation of ROI depending on difficulty changes and competition

part 2
after getting a long term list of results to show the variations of income / ROI projections.
putting those numbers against bitcoins price history to then see a rough guide to the speculative difference over that time

that kind of information is something people like to see

not only would the above help you learn more math. but also how to API call data or scrape data from other sources

Yeah actually that's my weakest spot, sockets and API's since I have to use libraries and It gets complicated Cheesy

well you can just search manually how many hashs a latest ASIC can do https://enshop.bitmain.com/product.htm
well you can just search manually how much the latest ASIC costs https://enshop.bitmain.com/product.htm
well you can just search manually how much hashpower a pool has https://www.antpool.com/
well you can just search manually how many blocks a pool solves. https://blockchain.info/pools?timespan=24hours
well you can just search manually how much bitcoin is worth

set up the maths. and then at a later date work on how to automate it and grab long term data once your happy with the math,

anyway is was just a suggestion to expand your learning

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Kprawn
Legendary
*
Offline Offline

Activity: 1904
Merit: 1073


View Profile
August 14, 2016, 06:24:22 PM
 #8

You can do much better than this.. We are to lazy to input X & Y .... give us something that grabs historic data or current information from say, Preev.com and then display the historic value and the

current value. That's why I like Preev,com, it takes only one input and you set to go... it does the rest. It is a big schlep to find historic data, when you want to make a statement, so it will be nice to

have a one-stop site to automate this.  Wink

THE FIRST DECENTRALIZED & PLAYER-OWNED CASINO
.EARNBET..EARN BITCOIN: DIVIDENDS
FOR-LIFETIME & MUCH MORE.
. BET WITH: BTCETHEOSLTCBCHWAXXRPBNB
.JOIN US: GITLABTWITTERTELEGRAM
franky1
Legendary
*
Offline Offline

Activity: 4228
Merit: 4501



View Profile
August 14, 2016, 06:27:03 PM
 #9

You can do much better than this.. We are to lazy to input X & Y .... give us something that grabs historic data or current information from say, Preev.com and then display the historic value and the

current value. That's why I like Preev,com, it takes only one input and you set to go... it does the rest. It is a big schlep to find historic data, when you want to make a statement, so it will be nice to

have a one-stop site to automate this.  Wink
i think the OP is a beginner. i was thinking more of a task to help him learn more about bitcoin such as pools, hashrate, difficulty, price and return of investment that way he gets aquented with bitcoin while learning c++ and then can start to offer services later

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!